]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Survival: More pickup options for attackers.
authorLyberta <lyberta@lyberta.net>
Wed, 3 May 2017 23:15:26 +0000 (02:15 +0300)
committerLyberta <lyberta@lyberta.net>
Wed, 3 May 2017 23:15:26 +0000 (02:15 +0300)
qcsrc/server/mutators/mutator/gamemode_survival.qc
survival.cfg

index 7a1378093013e0eeb1ba6237114fe8e61fe690b3..12859e34e85f943ae47a74380ea806adb98f0df9 100644 (file)
@@ -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;
                }
index 2a9d95bbef966c776d1029125e3623f46ad4f51a..0f9bc54e37e0e0b02d834859e3ac10d98a33dcd3 100644 (file)
@@ -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"