diff --git a/source/src/client.cpp b/source/src/client.cpp index d901a4b7..47e0db15 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -53,7 +53,7 @@ void ctf_team(char *name) }; void newname(char *name) { c2sinit = false; strn0cpy(player1->name, name, 16); }; -void newskin(int skin) { player1->nextskin = min(0, max(skin, (rb_team_int(player1->team)==TEAM_CLA ? 3 : 5))); c2sinit=false; }; +void newskin(int skin) { player1->nextskin = max(0, min(skin, (rb_team_int(player1->team)==TEAM_CLA ? 3 : 5))); c2sinit=false; }; void newteam(char *name) { if(m_teammode) ctf_team(name); diff --git a/source/src/clientextras.cpp b/source/src/clientextras.cpp index 1d047518..34166223 100644 --- a/source/src/clientextras.cpp +++ b/source/src/clientextras.cpp @@ -52,7 +52,7 @@ void renderplayer(dynent *d) if(!d) return; int team = rb_team_int(d->team); - sprintf_sd(mdl)("playermodels/%s/0%i", team==TEAM_CLA ? "terrorist" : "counterterrorist", 1 + min(0, max(d->skin, (rb_team_int(d->team)==TEAM_CLA ? 3 : 5)))); + sprintf_sd(mdl)("playermodels/%s/0%i", team==TEAM_CLA ? "terrorist" : "counterterrorist", 1 + max(0, min(d->skin, (team==TEAM_CLA ? 3 : 5)))); renderclient(d, isteam(player1->team, d->team), mdl, false, 1.6f); if(d->gunselect>=0 && d->gunselectname, text); sgetstr(); strcpy_s(d->team, text); - getint(p); + d->skin = getint(p); d->lifesequence = getint(p); break; };