]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Show Vaporizer damagetext when not playing InstaGib
authorotta8634 <k9wolf@pm.me>
Sat, 21 Dec 2024 06:42:40 +0000 (14:42 +0800)
committerotta8634 <k9wolf@pm.me>
Sat, 21 Dec 2024 06:42:40 +0000 (14:42 +0800)
I didn't even know it did 150 damage...

qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc

index 7c9043e00e4b7fdf838d86d12e06f7c7587b9be8..11f10345baa7f7193871d0fc06c3aee90f6e87fe 100644 (file)
@@ -1,5 +1,7 @@
 #include "sv_damagetext.qh"
 
+#include <common/mutators/mutator/instagib/sv_instagib.qh>
+
 AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage");
 
 REGISTER_MUTATOR(damagetext, true);
@@ -67,7 +69,7 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) {
        float armor = M_ARGV(3, float);
        int deathtype = M_ARGV(5, int);
        float potential_damage = M_ARGV(6, float);
-       if(DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER) return;
+       if(autocvar_g_instagib && DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER) return;
 
        static entity net_text_prev;
        static float net_damagetext_prev_time;