From: terencehill Date: Thu, 15 Feb 2024 15:25:59 +0000 (+0100) Subject: Make work hit indicator and damage text with the Vaporizer outside of Instagib. Also... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9bd66f032a560d43599000d11afe1c9e3591357;p=xonotic%2Fxonotic-data.pk3dir.git Make work hit indicator and damage text with the Vaporizer outside of Instagib. Also fix suicide displaying damage text even if cl_damagetext_received is 0 --- diff --git a/qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc index a4db479ec..07727344f 100644 --- a/qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc @@ -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); diff --git a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc index d72bc973a..2887efd8d 100644 --- a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc @@ -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;