]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improve the detection of the automatic "help me" notifier
authorSamual Lenks <samual@xonotic.org>
Thu, 6 Sep 2012 04:38:58 +0000 (00:38 -0400)
committerSamual Lenks <samual@xonotic.org>
Thu, 6 Sep 2012 04:38:58 +0000 (00:38 -0400)
qcsrc/server/mutators/gamemode_ctf.qc

index b57227625cb014cec63035687010eedc65cab62b..241313b93d8e2f305bb0a9368917548a14fc7e93 100644 (file)
@@ -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;