Skip to content

Commit 34b4920

Browse files
committed
Fix teamxcolor 'off' not respected on server join
1 parent 3b86254 commit 34b4920

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

ssqc/commands.qc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,8 @@ void (entity pl) PrintWho = {
314314
}
315315

316316
void (entity pov, string color, float tno) UpdateTeamColor = {
317-
if (color == "off"){
318-
color = "";
319-
}
320-
321317
local string command = "";
318+
322319
switch (tno) {
323320
case 1:
324321
command = "team1color";

ssqc/tforttm.qc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,22 @@ string TeamFortress_TeamGetColorFor(entity pov, float tno) {
7171
switch (tno) {
7272
case 1:
7373
color = infokey(pov, "team1color");
74-
if (color == "")
74+
if (color == "" || color == "off")
7575
color = BLUETEAMCOLOR;
7676
break;
7777
case 2:
7878
color = infokey(pov, "team2color");
79-
if (color == "")
79+
if (color == "" || color == "off")
8080
color = REDTEAMCOLOR;
8181
break;
8282
case 3:
8383
color = infokey(pov, "team3color");
84-
if (color == "")
84+
if (color == "" || color == "off")
8585
color = YELLOWTEAMCOLOR;
8686
break;
8787
case 4:
8888
color = infokey(pov, "team4color");
89-
if (color == "")
89+
if (color == "" || color == "off")
9090
color = GREENTEAMCOLOR;
9191
break;
9292
}

0 commit comments

Comments
 (0)