Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
drzel committed Aug 7, 2024
1 parent e53b6c1 commit a8b659d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ssqc/tfort.qc
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ string(float pc) TeamFortress_GetSkin =
};


void (entity player) TeamFortress_ResetSkins = {
void (entity player) TeamFortress_SetSkinInfos = {
local string st = TeamFortress_GetSkin(player.playerclass);
stuffcmd(player, "skin ");
stuffcmd(player, st);
Expand Down Expand Up @@ -1204,21 +1204,19 @@ void (entity player) TeamFortress_ResetSkins = {
}

void (entity p) TeamFortress_SetSkin = {
local string st;

p.immune_to_check = time + 10;

if (p.playerclass == PC_SPY || p.last_playerclass == PC_SPY) {
if (!p.is_undercover) {
TeamFortress_ResetSkins(p);
TeamFortress_SetSkinInfos(p);
} else {
Spy_SetClientSkins(p);
}
} else {
p.skin = p.playerclass;

if (p.skin != 0) {
TeamFortress_ResetSkins(p);
TeamFortress_SetSkinInfos(p);
} else {
stuffcmd(p, "skin base\n");
}
Expand Down

0 comments on commit a8b659d

Please sign in to comment.