Skip to content

Commit 34628cd

Browse files
committed
Merge branch 'fo-skins' into staging
2 parents e87c1ab + 402bb8b commit 34628cd

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

ssqc/commands.qc

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,30 @@ void (entity pl) PrintWho = {
313313
strunzone(msg);
314314
}
315315

316-
void (entity pov, string command, string color, float tno) UpdateTeamColor = {
316+
void (entity pov, string color, float tno) UpdateTeamColor = {
317+
local string command = "";
318+
switch (tno) {
319+
case 1:
320+
command = "team1color";
321+
break;
322+
case 2:
323+
command = "team2color";
324+
break;
325+
case 3:
326+
command = "team3color";
327+
break;
328+
case 4:
329+
command = "team4color";
330+
break;
331+
}
332+
317333
forceinfokey(pov, command, color);
318334

319335
local entity te = find(world, classname, "player");
320336
while (te != world) {
321-
if (te.team_no == tno)
337+
if (te.team_no == tno) {
322338
TeamFortress_SetSkin(te);
339+
}
323340

324341
te = find(te, classname, "player");
325342
}
@@ -380,19 +397,19 @@ float (string arg1, string arg2, string arg3) ParseCmds = {
380397
}
381398
break;
382399
case "team1color":
383-
UpdateTeamColor(self, "team1color", arg3, 1);
400+
UpdateTeamColor(self, arg3, 1);
384401
processedCmd = TRUE;
385402
break;
386403
case "team2color":
387-
UpdateTeamColor(self, "team2color", arg3, 2);
404+
UpdateTeamColor(self, arg3, 2);
388405
processedCmd = TRUE;
389406
break;
390407
case "team3color":
391-
UpdateTeamColor(self, "team3color", arg3, 3);
408+
UpdateTeamColor(self, arg3, 3);
392409
processedCmd = TRUE;
393410
break;
394411
case "team4color":
395-
UpdateTeamColor(self, "team4color", arg3, 4);
412+
UpdateTeamColor(self, arg3, 4);
396413
processedCmd = TRUE;
397414
break;
398415
}

ssqc/tfort.qc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,8 @@ string(float pc) TeamFortress_GetSkin =
11761176

11771177
void (entity player) TeamFortress_SetSkinInfos = {
11781178
local string st = TeamFortress_GetSkin(player.playerclass);
1179-
stuffcmd(player, sprintf("skin %s\n", st));
1179+
local string command = sprintf("skin %s\n", st);
1180+
stuffcmd(player, command);
11801181
forceinfokey(player, "skin", st); // please fix mvd recording
11811182

11821183
local string color;

ssqc/tforttm.qc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ float (float tno) TeamFortress_TeamGetColor = {
5252
};
5353

5454
string TeamFortress_TeamGetColorFor(entity pov, float tno) {
55-
local string color = "FFFFFF";
55+
local string color = "0xFFFFFF";
5656

5757
if (pov.team_no == tno && cvar("teamcolor")) {
5858
color = cvar_string("teamcolor");

0 commit comments

Comments
 (0)