From 8368e70f301db2c75f6ff4641ab05212da20d4af Mon Sep 17 00:00:00 2001 From: Lyberta Date: Thu, 4 May 2017 02:15:26 +0300 Subject: [PATCH] Survival: More pickup options for attackers. --- .../mutators/mutator/gamemode_survival.qc | 37 ++++++++++++++++++- survival.cfg | 8 ++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index 7a1378093..12859e34e 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -103,6 +103,15 @@ int autocvar_g_surv_cannon_fodder_num_random_start_weapons; int autocvar_g_surv_attacker_pickup_ammo_health; /// \brief How much armor do attackers get when they pickup ammo. int autocvar_g_surv_attacker_pickup_ammo_armor; +/// \brief How much health do attackers get when they pickup a weapon. +int autocvar_g_surv_attacker_pickup_weapon_health; +/// \brief How much armor do attackers get when they pickup a weapon. +int autocvar_g_surv_attacker_pickup_weapon_armor; +/// \brief How much health do attackers get when they pickup a dropped weapon. +int autocvar_g_surv_attacker_pickup_droppedweapon_health; +/// \brief How much armor do attackers get when they pickup a dropped weapon. +int autocvar_g_surv_attacker_pickup_droppedweapon_armor; + /// \brief How many health do defenders get when they pickup small health. int autocvar_g_surv_defender_pickup_health_small; /// \brief How many health do defenders get when they pickup medium health. @@ -159,10 +168,12 @@ int autocvar_g_surv_defender_pickup_cells_mega; /// \brief How much score attackers gain per 1 point of damage. float autocvar_g_surv_attacker_damage_score; + /// \brief How much defenders damage others. Higher values mean more damage. float autocvar_g_surv_defender_attack_scale; /// \brief How much defenders get damaged. High values mean less damage. float autocvar_g_surv_defender_defense_scale; + /// \brief How much cannon fodder damages others. Higher values mean more /// damage. float autocvar_g_surv_cannon_fodder_attack_scale; @@ -171,6 +182,7 @@ float autocvar_g_surv_cannon_fodder_defense_scale; /// \brief How much score attackers get for fragging defenders. float autocvar_g_surv_attacker_frag_score; + /// \brief How much health do defenders get when they frag an attacker. int autocvar_g_surv_defender_attacker_frag_health; /// \brief How much armor do defenders get when they frag an attacker. @@ -1776,7 +1788,6 @@ MUTATOR_HOOKFUNCTION(surv, ItemTouch) case "item_bullets": case "item_rockets": case "item_cells": - case "droppedweapon": { GivePlayerHealth(player, autocvar_g_surv_attacker_pickup_ammo_health); @@ -1784,6 +1795,30 @@ MUTATOR_HOOKFUNCTION(surv, ItemTouch) autocvar_g_surv_attacker_pickup_ammo_armor); return MUT_ITEMTOUCH_CONTINUE; } + case "weapon_machinegun": + case "weapon_uzi": + case "weapon_grenadelauncher": + case "weapon_electro": + case "weapon_crylink": + case "weapon_nex": + case "weapon_hagar": + case "weapon_rocketlauncher": + case "replacedweapon": + { + GivePlayerHealth(player, + autocvar_g_surv_attacker_pickup_weapon_health); + GivePlayerArmor(player, + autocvar_g_surv_attacker_pickup_weapon_armor); + return MUT_ITEMTOUCH_CONTINUE; + } + case "droppedweapon": + { + GivePlayerHealth(player, + autocvar_g_surv_attacker_pickup_droppedweapon_health); + GivePlayerArmor(player, + autocvar_g_surv_attacker_pickup_droppedweapon_armor); + return MUT_ITEMTOUCH_CONTINUE; + } } return MUT_ITEMTOUCH_CONTINUE; } diff --git a/survival.cfg b/survival.cfg index 2a9d95bbe..0f9bc54e3 100644 --- a/survival.cfg +++ b/survival.cfg @@ -45,6 +45,11 @@ set g_surv_cannon_fodder_random_start_weapons "machinegun mortar electro crylink set g_surv_attacker_pickup_ammo_health 25 "How much health do attackers get when they pickup ammo" set g_surv_attacker_pickup_ammo_armor 25 "How much armor do attackers get when they pickup ammo" +set g_surv_attacker_pickup_weapon_health 0 "How much health do attackers get when they pickup a weapon" +set g_surv_attacker_pickup_weapon_armor 0 "How much armor do attackers get when they pickup a weapon" +set g_surv_attacker_pickup_droppedweapon_health 25 "How much health do attackers get when they pickup a dropped weapon" +set g_surv_attacker_pickup_droppedweapon_armor 25 "How much armor do attackers get when they pickup a dropped weapon" + set g_surv_defender_pickup_health_small 0 "How much health do defenders get when they pickup small health" set g_surv_defender_pickup_health_medium 0 "How much health do defenders get when they pickup medium health" set g_surv_defender_pickup_health_big 0 "How much health do defenders get when they pickup big health" @@ -71,12 +76,15 @@ set g_surv_defender_pickup_cells_big 40 "How many cells do defenders get when th set g_surv_defender_pickup_cells_mega 50 "How many cells do defenders get when they pickup mega health/armor" set g_surv_attacker_damage_score 0.025 "How much score attackers gain per 1 point of damage" + set g_surv_defender_attack_scale 1 "How much defenders damage others. Higher values mean more damage" set g_surv_defender_defense_scale 2 "How much defenders get damaged. Higher values mean less damage" + set g_surv_cannon_fodder_attack_scale 1 "How much cannon fodder damages others. Higher values mean more damage" set g_surv_cannon_fodder_defense_scale 1 "How much cannon fodder gets damaged. Higher values mean less damage" set g_surv_attacker_frag_score 10 "How much score attackers get for fragging defenders" + set g_surv_defender_attacker_frag_health 0 "How much health do defenders get when they frag an attacker" set g_surv_defender_attacker_frag_armor 0 "How much armor do defenders get when they frag an attacker" set g_surv_defender_attacker_frag_shells 0 "How many shells do defenders get when they frag an attacker" -- 2.39.5