if (STAT(FROZEN, player) == FROZEN_NORMAL)
{
- WaypointSprite_UpdateMaxHealth(player.waypointsprite_attached, 1);
- WaypointSprite_UpdateHealth(player.waypointsprite_attached, STAT(REVIVE_PROGRESS, player));
+ entity player_wp = player.waypointsprite_attached;
+ if (n > 0 || (n == 0 && STAT(REVIVE_PROGRESS, player) > 0.95))
+ {
+ WaypointSprite_UpdateSprites(player_wp, WP_Reviving, WP_Null, WP_Null);
+ WaypointSprite_UpdateTeamRadar(player_wp, RADARICON_WAYPOINT, WP_REVIVING_COLOR);
+ }
+ else
+ {
+ WaypointSprite_UpdateSprites(player_wp, WP_Frozen, WP_Null, WP_Null);
+ WaypointSprite_UpdateTeamRadar(player_wp, RADARICON_WAYPOINT, WP_FROZEN_COLOR);
+ }
+
+ WaypointSprite_UpdateMaxHealth(player_wp, 1);
+ WaypointSprite_UpdateHealth(player_wp, STAT(REVIVE_PROGRESS, player));
}
return true;
REGISTER_WAYPOINT(Here, _("Here"), "", '0 1 0', 1);
REGISTER_WAYPOINT(Danger, _("DANGER"), "", '1 0.5 0', 1);
-REGISTER_WAYPOINT(Frozen, _("Frozen!"), "", '0.25 0.90 1', 1);
+const vector WP_FROZEN_COLOR = '0.25 0.9 1';
+const vector WP_REVIVING_COLOR = '1 0.5 0';
+REGISTER_WAYPOINT(Frozen, _("Frozen!"), "", WP_FROZEN_COLOR, 1);
+REGISTER_WAYPOINT(Reviving, _("Reviving"), "", WP_REVIVING_COLOR, 1);
REGISTER_WAYPOINT(Item, _("Item"), "", '1 0 1', 1);
{
// no check, as this is never called without doing an actual change (usually only once)
int i = icon.m_id;
- e.cnt = (e.cnt & BIT(7)) | (i & BITS(7));
- e.colormod = col;
- e.SendFlags |= 32;
+ int new_cnt = (e.cnt & BIT(7)) | (i & BITS(7));
+ if (new_cnt != e.cnt || col != e.colormod)
+ {
+ e.cnt = new_cnt;
+ e.colormod = col;
+ e.SendFlags |= 32;
+ }
}
void WaypointSprite_Ping(entity e)