mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-26 22:11:54 +00:00
- Centralise the saving of player actions within DCorePlayer
's serialiser.
This commit is contained in:
parent
27ae6a4c20
commit
03d957ffdf
5 changed files with 7 additions and 13 deletions
|
@ -635,9 +635,15 @@ void DCorePlayer::Serialize(FSerializer& arc)
|
|||
arc("pnum", pnum)
|
||||
("actor", actor)
|
||||
("angles", Angles)
|
||||
("actions", cmd.ucmd.actions)
|
||||
//("cmd", cmd)
|
||||
//("lastcmd", lastcmd)
|
||||
;
|
||||
|
||||
if (arc.isReading())
|
||||
{
|
||||
cmd.ucmd.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
}
|
||||
|
||||
void DCoreActor::Serialize(FSerializer& arc)
|
||||
|
|
|
@ -2477,14 +2477,12 @@ void DBloodPlayer::Serialize(FSerializer& arc)
|
|||
("quakeeffect", quakeEffect)
|
||||
("player_par", player_par)
|
||||
("waterpal", nWaterPal)
|
||||
("actions", cmd.ucmd.actions)
|
||||
.Array("posturedata", &pPosture[0][0], &gPostureDefaults[0][0], kModeMax * kPostureMax) // only save actual changes in this.
|
||||
;
|
||||
|
||||
if (arc.isReading())
|
||||
{
|
||||
playerResetPosture(this);
|
||||
cmd.ucmd.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -258,7 +258,6 @@ void DDukePlayer::Serialize(FSerializer& arc)
|
|||
("moto_on_oil", moto_on_oil)
|
||||
("moto_on_mud", moto_on_mud)
|
||||
// new stuff
|
||||
("actions", cmd.ucmd.actions)
|
||||
.Array("frags", frags, MAXPLAYERS)
|
||||
("uservars", uservars)
|
||||
("fistsign", fistsign);
|
||||
|
@ -266,10 +265,8 @@ void DDukePlayer::Serialize(FSerializer& arc)
|
|||
if (arc.isReading())
|
||||
{
|
||||
invdisptime = 0;
|
||||
GetActor()->backuploc();
|
||||
opyoff = pyoff;
|
||||
backupweapon();
|
||||
cmd.ucmd.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2138,13 +2138,7 @@ void DExhumedPlayer::Serialize(FSerializer& arc)
|
|||
("save", sPlayerSave)
|
||||
("totalvel", totalvel)
|
||||
("grenade", pPlayerGrenade)
|
||||
("bUnderwater", bUnderwater)
|
||||
("actions", cmd.ucmd.actions);
|
||||
|
||||
if (arc.isReading())
|
||||
{
|
||||
cmd.ucmd.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
("bUnderwater", bUnderwater);
|
||||
}
|
||||
|
||||
FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerSave& w, PlayerSave* def)
|
||||
|
|
|
@ -559,7 +559,6 @@ void DSWPlayer::Serialize(FSerializer& arc)
|
|||
{
|
||||
ovect = vect;
|
||||
obob_z = bob_z;
|
||||
cmd.ucmd.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
memset(cookieQuote, 0, sizeof(cookieQuote)); // no need to remember this.
|
||||
StartColor = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue