From: Samual Lenks Date: Tue, 4 Sep 2012 19:48:10 +0000 (-0400) Subject: use the actual health/armor calculation for players waypointsprite display X-Git-Tag: xonotic-v0.7.0~240^2~54 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb9ccca732d3bf2e5c56703894ddcad8c6902247;p=xonotic%2Fxonotic-data.pk3dir.git use the actual health/armor calculation for players waypointsprite display --- diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index a00d3145b..b549e4c57 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -727,8 +727,7 @@ void ctf_FlagThink() { vector desired_direction = normalize(targ_origin - self.origin); vector current_direction = normalize(self.velocity); - - // self.velocity = (normalize(current_direction + (desired_direction * autocvar_g_ctf_pass_turnrate)) * autocvar_g_ctf_pass_velocity); + self.velocity = (normalize(current_direction + (desired_direction * autocvar_g_ctf_pass_turnrate)) * autocvar_g_ctf_pass_velocity); } return; @@ -1020,7 +1019,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink) // update the health of the flag carrier waypointsprite if(self.wps_flagcarrier) - WaypointSprite_UpdateHealth(self.wps_flagcarrier, self.health); + WaypointSprite_UpdateHealth(self.wps_flagcarrier, healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent)); return 0; } @@ -1042,6 +1041,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) WaypointSprite_HelpMePing(frag_target.wps_flagcarrier); // TODO: only do this if there is a significant loss of health? }