From: Samual Lenks Date: Thu, 6 Sep 2012 04:38:58 +0000 (-0400) Subject: Improve the detection of the automatic "help me" notifier X-Git-Tag: xonotic-v0.7.0~240^2~47 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5abe7760e8867f0e6001991049795a3da07813a0;p=xonotic%2Fxonotic-data.pk3dir.git Improve the detection of the automatic "help me" notifier --- diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index b57227625..241313b93 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -1049,8 +1049,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values t } else if(frag_target.flagcarried && (frag_target.deadflag == DEAD_NO) && IsDifferentTeam(frag_target, frag_attacker)) // if the target is a flagcarrier { - // healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent) - if(autocvar_g_ctf_flagcarrier_auto_helpme_when_damaged > frag_target.health) + if(autocvar_g_ctf_flagcarrier_auto_helpme_when_damaged > ('1 0 0' * healtharmor_maxdamage(frag_target.health, frag_target.armorvalue, autocvar_g_balance_armor_blockpercent))) WaypointSprite_HelpMePing(frag_target.wps_flagcarrier); // TODO: only do this if there is a significant loss of health? } return 0;