]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add overkill blaster keepforce and keepdamage cvars
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 7 Apr 2023 07:53:57 +0000 (17:53 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 7 Apr 2023 07:53:57 +0000 (17:53 +1000)
Equivalent to the instagib blaster cvars.

mutators.cfg
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc

index 900f4ae0033fd0f057308323b483964f7ea2fe2c..66fe9214205907c7797e291b814f56a19fe65d3b 100644 (file)
@@ -63,6 +63,8 @@ set g_overkill_filter_healthmega 0
 set g_overkill_filter_armormedium 1
 set g_overkill_filter_armorbig 1
 set g_overkill_filter_armormega 0
+set g_overkill_blaster_keepdamage 0 "allow secondary fire to hurt players"
+set g_overkill_blaster_keepforce 0 "allow secondary fire to push players"
 
 
 // =========
index 009acc355738fd80fd235d59e5a1bc3bae663d01..5dd0fdbb255c45031d31bf237a85e9dc24d8c95b 100644 (file)
@@ -5,8 +5,9 @@
 #include "okrpc.qh"
 
 bool autocvar_g_overkill_powerups_replace;
-
 bool autocvar_g_overkill_itemwaypoints = true;
+bool autocvar_g_overkill_blaster_keepforce = false;
+bool autocvar_g_overkill_blaster_keepdamage = false;
 
 .Weapon ok_lastwep[MAX_WEAPONSLOTS];
 
@@ -69,11 +70,11 @@ MUTATOR_HOOKFUNCTION(ok, Damage_Calculate, CBC_ORDER_LAST)
                if(frag_attacker != frag_target)
                if(!STAT(FROZEN, frag_target))
                if(!IS_DEAD(frag_target))
-               {
+               if(!autocvar_g_overkill_blaster_keepforce)
                        M_ARGV(6, vector) = '0 0 0'; // force
-               }
 
-               M_ARGV(4, float) = 0; // damage
+               if(!autocvar_g_overkill_blaster_keepdamage)
+                       M_ARGV(4, float) = 0; // damage
        }
 }