Delay skin setting on save load until player class is known.
- Fixed: Loading players from savegames set the skin before their current class was retrieved, so they could not validate their skins with the correct class.
This commit is contained in:
parent
7052d4e14e
commit
db4763b14a
3 changed files with 26 additions and 24 deletions
|
|
@ -2742,14 +2742,22 @@ void P_UnPredictPlayer ()
|
|||
void player_t::Serialize (FArchive &arc)
|
||||
{
|
||||
int i;
|
||||
FString skinname;
|
||||
|
||||
arc << cls
|
||||
<< mo
|
||||
<< camera
|
||||
<< playerstate
|
||||
<< cmd
|
||||
<< userinfo
|
||||
<< DesiredFOV << FOV
|
||||
<< cmd;
|
||||
if (arc.IsLoading())
|
||||
{
|
||||
ReadUserInfo(arc, userinfo, skinname);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteUserInfo(arc, userinfo);
|
||||
}
|
||||
arc << DesiredFOV << FOV
|
||||
<< viewz
|
||||
<< viewheight
|
||||
<< deltaviewheight
|
||||
|
|
@ -2900,6 +2908,10 @@ void player_t::Serialize (FArchive &arc)
|
|||
oldbuttons = ~0;
|
||||
original_oldbuttons = ~0;
|
||||
}
|
||||
if (skinname.IsNotEmpty())
|
||||
{
|
||||
userinfo.SkinChanged(skinname, CurrentPlayerClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue