Skip to content

Commit

Permalink
Merge branch 'fo-skins' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
drzel committed Aug 7, 2024
2 parents 38eef0c + 1052feb commit 8bc5902
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
7 changes: 5 additions & 2 deletions ssqc/client.qc
Original file line number Diff line number Diff line change
Expand Up @@ -2257,11 +2257,14 @@ void () PutClientInServer = {
TeamFortress_SetEquipment();
TeamFortress_SetHealth();
TeamFortress_SetSpeed(self);

TeamFortress_SetSkin(self);

te = find(world, classname, "player");
while (te != world) {
TeamFortress_SetSkin(te);
if (te != self) {
TeamFortress_SetSkin(te);
}

te = find(te, classname, "player");
}

Expand Down
35 changes: 16 additions & 19 deletions ssqc/tfort.qc
Original file line number Diff line number Diff line change
Expand Up @@ -1176,28 +1176,25 @@ string(float pc) TeamFortress_GetSkin =

void (entity player) TeamFortress_SetSkinInfos = {
local string st = TeamFortress_GetSkin(player.playerclass);
stuffcmd(player, "skin ");
stuffcmd(player, st);
stuffcmd(player, "\n");
// please fix mvd recording
forceinfokey(player, "skin", st);
stuffcmd(player, sprintf("skin %s\n", st));
forceinfokey(player, "skin", st); // please fix mvd recording

local string color;
local entity te;

te = find(world, classname, "player");
local entity te = find(world, classname, "player");
while (te != world) {
msg_entity = te;
color = TeamFortress_TeamGetColorFor(te, player.team_no);

WriteByte(MSG_ONE, SVC_SETINFO);
WriteByte(MSG_ONE, player.colormap-1); // ???? Copied from spy.qc
WriteString(MSG_ONE, "topcolor");
WriteString(MSG_ONE, color);
WriteByte(MSG_ONE, SVC_SETINFO);
WriteByte(MSG_ONE, player.colormap-1); // ???? Copied from spy.qc
WriteString(MSG_ONE, "bottomcolor");
WriteString(MSG_ONE, color);
if (te != player) {
msg_entity = te;
color = TeamFortress_TeamGetColorFor(te, player.team_no);

WriteByte(MSG_ONE, SVC_SETINFO);
WriteByte(MSG_ONE, player.colormap-1); // ???? Copied from spy.qc
WriteString(MSG_ONE, "topcolor");
WriteString(MSG_ONE, color);
WriteByte(MSG_ONE, SVC_SETINFO);
WriteByte(MSG_ONE, player.colormap-1); // ???? Copied from spy.qc
WriteString(MSG_ONE, "bottomcolor");
WriteString(MSG_ONE, color);
}

te = find(te, classname, "player");
}
Expand Down

0 comments on commit 8bc5902

Please sign in to comment.