mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 06:22:07 +00:00
Fixes for serializing and initializing
Fixed missing DViewPosition serializing. Fixed missing initializers in player_t.
This commit is contained in:
parent
2ad191b374
commit
abf0206706
4 changed files with 17 additions and 13 deletions
|
@ -756,12 +756,6 @@ public:
|
||||||
int Flags;
|
int Flags;
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
DViewPosition()
|
|
||||||
{
|
|
||||||
Offset = { 0,0,0 };
|
|
||||||
Flags = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Set(DVector3 &off, int f = -1)
|
void Set(DVector3 &off, int f = -1)
|
||||||
{
|
{
|
||||||
ZeroSubnormalsF(off.X);
|
ZeroSubnormalsF(off.X);
|
||||||
|
@ -777,6 +771,8 @@ public:
|
||||||
{
|
{
|
||||||
return Offset.isZero();
|
return Offset.isZero();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Serialize(FSerializer& arc) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
const double MinVel = EQUAL_EPSILON;
|
const double MinVel = EQUAL_EPSILON;
|
||||||
|
|
|
@ -322,8 +322,8 @@ public:
|
||||||
AActor *mo = nullptr;
|
AActor *mo = nullptr;
|
||||||
uint8_t playerstate = 0;
|
uint8_t playerstate = 0;
|
||||||
ticcmd_t cmd = {};
|
ticcmd_t cmd = {};
|
||||||
usercmd_t original_cmd;
|
usercmd_t original_cmd = {};
|
||||||
uint32_t original_oldbuttons;
|
uint32_t original_oldbuttons = 0;
|
||||||
|
|
||||||
userinfo_t userinfo; // [RH] who is this?
|
userinfo_t userinfo; // [RH] who is this?
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ public:
|
||||||
// mo->velx and mo->vely represent true velocity experienced by player.
|
// mo->velx and mo->vely represent true velocity experienced by player.
|
||||||
// This only represents the thrust that the player applies himself.
|
// This only represents the thrust that the player applies himself.
|
||||||
// This avoids anomalies with such things as Boom ice and conveyors.
|
// This avoids anomalies with such things as Boom ice and conveyors.
|
||||||
DVector2 Vel = { 0,0 };
|
DVector2 Vel;
|
||||||
|
|
||||||
bool centering = false;
|
bool centering = false;
|
||||||
uint8_t turnticks = 0;
|
uint8_t turnticks = 0;
|
||||||
|
@ -419,10 +419,10 @@ public:
|
||||||
FString SoundClass;
|
FString SoundClass;
|
||||||
FString LogText; // [RH] Log for Strife
|
FString LogText; // [RH] Log for Strife
|
||||||
FString SubtitleText;
|
FString SubtitleText;
|
||||||
int SubtitleCounter;
|
int SubtitleCounter = 0;
|
||||||
|
|
||||||
DAngle MinPitch = nullAngle; // Viewpitch limits (negative is up, positive is down)
|
DAngle MinPitch; // Viewpitch limits (negative is up, positive is down)
|
||||||
DAngle MaxPitch = nullAngle;
|
DAngle MaxPitch;
|
||||||
|
|
||||||
double crouchfactor = 0;
|
double crouchfactor = 0;
|
||||||
double crouchoffset = 0;
|
double crouchoffset = 0;
|
||||||
|
@ -432,7 +432,7 @@ public:
|
||||||
|
|
||||||
// [CW] I moved these here for multiplayer conversation support.
|
// [CW] I moved these here for multiplayer conversation support.
|
||||||
TObjPtr<AActor*> ConversationNPC = MakeObjPtr<AActor*>(nullptr), ConversationPC = MakeObjPtr<AActor*>(nullptr);
|
TObjPtr<AActor*> ConversationNPC = MakeObjPtr<AActor*>(nullptr), ConversationPC = MakeObjPtr<AActor*>(nullptr);
|
||||||
DAngle ConversationNPCAngle = nullAngle;
|
DAngle ConversationNPCAngle;
|
||||||
bool ConversationFaceTalker = false;
|
bool ConversationFaceTalker = false;
|
||||||
|
|
||||||
DVector3 LastSafePos = {}; // Mark the last known safe location the player was standing.
|
DVector3 LastSafePos = {}; // Mark the last known safe location the player was standing.
|
||||||
|
|
|
@ -1545,6 +1545,13 @@ void DActorModelData::OnDestroy()
|
||||||
animationIDs.Reset();
|
animationIDs.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DViewPosition::Serialize(FSerializer& arc)
|
||||||
|
{
|
||||||
|
Super::Serialize(arc);
|
||||||
|
arc("offset", Offset)
|
||||||
|
("flags", Flags);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// PROC P_ExplodeMissile
|
// PROC P_ExplodeMissile
|
||||||
|
|
|
@ -1788,6 +1788,7 @@ void player_t::Serialize(FSerializer &arc)
|
||||||
("musinfoactor", MUSINFOactor)
|
("musinfoactor", MUSINFOactor)
|
||||||
("musinfotics", MUSINFOtics)
|
("musinfotics", MUSINFOtics)
|
||||||
("soundclass", SoundClass)
|
("soundclass", SoundClass)
|
||||||
|
("angleoffsettargets", angleOffsetTargets);
|
||||||
("lastsafepos", LastSafePos);
|
("lastsafepos", LastSafePos);
|
||||||
|
|
||||||
if (arc.isWriting ())
|
if (arc.isWriting ())
|
||||||
|
|
Loading…
Reference in a new issue