mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Fixed: userinfo_t::SkinChanged() was unaware of player classes
This commit is contained in:
parent
0f7ad00d9a
commit
7052d4e14e
2 changed files with 6 additions and 6 deletions
|
@ -387,7 +387,7 @@ void D_SetupUserInfo ()
|
|||
{
|
||||
// Some cvars don't copy their original value directly.
|
||||
case NAME_Team: coninfo->TeamChanged(team); break;
|
||||
case NAME_Skin: coninfo->SkinChanged(skin); break;
|
||||
case NAME_Skin: coninfo->SkinChanged(skin, players[consoleplayer].CurrentPlayerClass); break;
|
||||
case NAME_Gender: coninfo->GenderChanged(gender); break;
|
||||
case NAME_PlayerClass: coninfo->PlayerClassChanged(playerclass); break;
|
||||
// The rest do.
|
||||
|
@ -447,9 +447,9 @@ int userinfo_t::TeamChanged(int team)
|
|||
return team;
|
||||
}
|
||||
|
||||
int userinfo_t::SkinChanged(const char *skinname)
|
||||
int userinfo_t::SkinChanged(const char *skinname, int playerclass)
|
||||
{
|
||||
int skinnum = R_FindSkin(skinname, 0);
|
||||
int skinnum = R_FindSkin(skinname, playerclass);
|
||||
*static_cast<FIntCVar *>((*this)[NAME_Skin]) = skinnum;
|
||||
return skinnum;
|
||||
}
|
||||
|
@ -821,7 +821,7 @@ void D_ReadUserInfoStrings (int pnum, BYTE **stream, bool update)
|
|||
break;
|
||||
|
||||
case NAME_Skin:
|
||||
info->SkinChanged(value);
|
||||
info->SkinChanged(value, players[pnum].CurrentPlayerClass);
|
||||
if (players[pnum].mo != NULL)
|
||||
{
|
||||
if (players[pnum].cls != NULL &&
|
||||
|
@ -958,7 +958,7 @@ void ReadUserInfo(FArchive &arc, userinfo_t &info)
|
|||
switch (name)
|
||||
{
|
||||
case NAME_Team: info.TeamChanged(atoi(str)); break;
|
||||
case NAME_Skin: info.SkinChanged(str); break;
|
||||
case NAME_Skin: info.SkinChanged(str, 0); break;
|
||||
case NAME_PlayerClass: info.PlayerClassChanged(str); break;
|
||||
default:
|
||||
val.String = str;
|
||||
|
|
|
@ -332,7 +332,7 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
|||
|
||||
void Reset();
|
||||
int TeamChanged(int team);
|
||||
int SkinChanged(const char *skinname);
|
||||
int SkinChanged(const char *skinname, int playerclass);
|
||||
int SkinNumChanged(int skinnum);
|
||||
int GenderChanged(const char *gendername);
|
||||
int PlayerClassChanged(const char *classname);
|
||||
|
|
Loading…
Reference in a new issue