float mod_active; // is there any active mod icon?
+// Clan Arena HUD modicons
+void HUD_Mod_CA(vector pos, vector mySize)
+{
+ mod_active = 1; // CA should never hide the mod icons panel
+ float redalive, bluealive;
+ redalive = getstati(STAT_REDALIVE);
+ bluealive = getstati(STAT_BLUEALIVE);
+
+ vector redpos, bluepos;
+ if(mySize_x > mySize_y)
+ {
+ redpos = pos;
+ bluepos = pos + eX * 0.5 * mySize_x;
+ drawpic_aspect_skin(redpos, "player_red.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(redpos + eX * 0.5 * mySize_x, ftos(redalive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(bluepos, "player_blue.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(bluepos + eX * 0.5 * mySize_x, ftos(bluealive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+ else
+ {
+ redpos = pos;
+ bluepos = pos + eY * 0.5 * mySize_y;
+ drawpic_aspect_skin(redpos, "player_red.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(redpos + eY * 0.3 * mySize_y, ftos(redalive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(bluepos, "player_blue.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(bluepos + eY * 0.3 * mySize_y, ftos(bluealive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+}
+
// CTF HUD modicon section
float redflag_prevframe, blueflag_prevframe; // status during previous frame
float redflag_prevstatus, blueflag_prevstatus; // last remembered status
HUD_Mod_NexBall(pos, mySize);
else if(gametype == GAME_CTS || gametype == GAME_RACE)
HUD_Mod_Race(pos, mySize);
+ else if(gametype == GAME_CA)
+ HUD_Mod_CA(pos, mySize);
}
// Draw pressed keys (#11)
float next_round;
float stopalivecheck;
+float redalive, bluealive;
/**
* This function finds out whether an arena round is over 1 player is left.
* It determines the last player who's still alive and saves it's entity reference
}
// this is STUPID to perform again, but has to be done so that we can give instant feedback when a round ends
// and so the code won't start searching for a champion using find() before all players are actually REMOVED
- float redalive, bluealive;
+ redalive = 0; bluealive = 0;
FOR_EACH_PLAYER(self) {
if (self.team == COLOR_TEAM1 && self.health >= 1) redalive += 1;
else if (self.team == COLOR_TEAM2 && self.health >= 1) bluealive += 1;