]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make work hit indicator and damage text with the Vaporizer outside of Instagib. Also...
authorterencehill <piuntn@gmail.com>
Thu, 15 Feb 2024 15:25:59 +0000 (16:25 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 15 Feb 2024 15:25:59 +0000 (16:25 +0100)
qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc
qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc

index a4db479ecadbea508bbb1712eb02b4123f359dab..07727344fb45ea45ec804d6f7c67d3ae3c15ec02 100644 (file)
@@ -244,9 +244,10 @@ NET_HANDLE(damagetext, bool isNew)
        int client_entity_index = server_entity_index - 1;
        entity entcs = entcs_receiver(client_entity_index);
 
-       if (attacker_entcs && client_entity_index == current_player)
+       if (client_entity_index == current_player)
        {
-               if (autocvar_cl_hit_indicator && autocvar_cl_hit_indicator_size > 0 && !autocvar_chase_active)
+               if (attacker_entcs && !autocvar_chase_active
+                       && autocvar_cl_hit_indicator && autocvar_cl_hit_indicator_size > 0)
                {
                        float total = rint((health + armor) / DAMAGETEXT_PRECISION_MULTIPLIER);
                        HitIndicatorUpdate(total, attacker_entcs);
index d72bc973afd31181c35ca9949bbdf680e25db217..2887efd8d1c4913cf5fa780d5b59c146726cfbfb 100644 (file)
@@ -63,7 +63,9 @@ 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(MUTATOR_IS_ENABLED(mutator_instagib) && DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER)
+               return;
 
        int flags = 0;
        if (SAME_TEAM(hit, attacker)) flags |= DTFLAG_SAMETEAM;