From: bones_was_here Date: Fri, 7 Apr 2023 07:53:57 +0000 (+1000) Subject: Add overkill blaster keepforce and keepdamage cvars X-Git-Tag: xonotic-v0.8.6~131^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e86c571b394c1fade7eb8d21ba352ee1b5a26b95;p=xonotic%2Fxonotic-data.pk3dir.git Add overkill blaster keepforce and keepdamage cvars Equivalent to the instagib blaster cvars. --- diff --git a/mutators.cfg b/mutators.cfg index 900f4ae00..66fe92142 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -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" // ========= diff --git a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc index 009acc355..5dd0fdbb2 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -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 } }