}
}
-.float last_respawn;
void ctf_RespawnFlag(entity flag)
{
flag.watertype = CONTENT_EMPTY; // TODO: it is unclear why this workaround is needed, likely many other potential breakage points!!
- // check for flag respawn being called twice in a row
- if(flag.last_respawn > time - 0.5)
- { backtrace("flag respawn called twice quickly! please notify Samual about this..."); }
-
- flag.last_respawn = time;
// reset the player (if there is one)
if((flag.owner) && (flag.owner.flagcarried == flag))
flag.nextthink = time + FLAG_THINKRATE;
flag.ctf_status = FLAG_BASE;
+ // set correct team colors
+ flag.glowmod = Team_ColorRGB(teamnum);
+ flag.colormap = (teamnum) ? (teamnum - 1) * 0x11 : 0x00;
+ flag.colormap |= BIT(10); // RENDER_COLORMAPPED
+
// crudely force them all to 0
if(autocvar_g_ctf_score_ignore_fields)
flag.cnt = flag.score_assist = flag.score_team_capture = flag.score_capture = flag.score_drop = flag.score_pickup = flag.score_return = 0;