]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
Replace team-coloured CTF flag textures with a single neutral texture, add support...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / ctf / sv_ctf.qc
index 670b00fa42c0a2b56877c395efa355b535b88259..5fbb2b2a68ea985daa18c8200f533973b7c8a433 100644 (file)
@@ -1304,6 +1304,11 @@ void ctf_FlagSetup(int teamnum, entity flag) // called when spawning a flag enti
        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;