Force team colors onto a player when spawning. We still gotta suppress

canges to them
This commit is contained in:
Marco Cawthorne 2021-05-24 12:47:33 +02:00
parent 0ab75f83bf
commit f7d14b97dd

View file

@ -61,15 +61,23 @@ CSEv_TeamJoin_f(float f)
/* mess, do it better */ /* mess, do it better */
if (f < 10) { if (f < 10) {
pl.team = 1; /* Blue */ pl.team = 1; /* Blue */
forceinfokey(pl, "topcolor", "0x9aff");
forceinfokey(pl, "bottomcolor", "0x9aff");
} else if (f < 20) { } else if (f < 20) {
pl.team = 2; /* Red */ pl.team = 2; /* Red */
f -= 10; f -= 10;
forceinfokey(pl, "topcolor", "0xff1800");
forceinfokey(pl, "bottomcolor", "0xff1800");
} else if (f < 30) { } else if (f < 30) {
pl.team = 3; /* Yellow */ pl.team = 3; /* Yellow */
f -= 20; f -= 20;
forceinfokey(pl, "topcolor", "0xffca00");
forceinfokey(pl, "bottomcolor", "0xffca00");
} else if (f < 40) { } else if (f < 40) {
pl.team = 4; /* Green */ pl.team = 4; /* Green */
f -= 30; f -= 30;
forceinfokey(pl, "topcolor", "0x3bff00");
forceinfokey(pl, "bottomcolor", "0x3bff00");
} }
pl.model = g_teammodels[f]; pl.model = g_teammodels[f];