mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-07 16:31:26 +00:00
- Ensure all games preserve SB_CENTERVIEW
and SB_CROUCH
bits upon loading.
This commit is contained in:
parent
ff8cea673e
commit
32480dde16
3 changed files with 13 additions and 3 deletions
|
@ -2491,8 +2491,14 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
("quakeeffect", w.quakeEffect)
|
||||
("player_par", w.player_par)
|
||||
("waterpal", w.nWaterPal)
|
||||
("actions", w.input.actions)
|
||||
.Array("posturedata", &w.pPosture[0][0], &gPostureDefaults[0][0], kModeMax * kPostureMax) // only save actual changes in this.
|
||||
.EndObject();
|
||||
|
||||
if (arc.isReading())
|
||||
{
|
||||
w.input.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
}
|
||||
return arc;
|
||||
}
|
||||
|
|
|
@ -2152,8 +2152,13 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, Player& w, Player*
|
|||
("totalvel", w.totalvel)
|
||||
("grenade", w.pPlayerGrenade)
|
||||
("bUnderwater", w.bUnderwater)
|
||||
|
||||
("actions", w.input.actions)
|
||||
.EndObject();
|
||||
|
||||
if (arc.isReading())
|
||||
{
|
||||
w.input.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
}
|
||||
return arc;
|
||||
}
|
||||
|
|
|
@ -568,8 +568,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
{
|
||||
w.ovect = w.vect;
|
||||
w.obob_z = w.bob_z;
|
||||
w.input = {};
|
||||
w.lastinput = {};
|
||||
w.input.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
memset(w.cookieQuote, 0, sizeof(w.cookieQuote)); // no need to remember this.
|
||||
w.StartColor = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue