mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-18 10:11:11 +00:00
- removed bSerialOverride.
Now that thinker linking is no longer part of the constructor, this hack is no longer needed.
This commit is contained in:
parent
1a633701b3
commit
acb71de53c
4 changed files with 0 additions and 9 deletions
|
@ -563,11 +563,7 @@ void PClass::InitializeDefaults()
|
|||
Defaults = (uint8_t *)M_Malloc(Size);
|
||||
|
||||
// run the constructor on the defaults to set the vtbl pointer which is needed to run class-aware functions on them.
|
||||
// Temporarily setting bSerialOverride prevents linking into the thinker chains.
|
||||
auto s = DThinker::bSerialOverride;
|
||||
DThinker::bSerialOverride = true;
|
||||
ConstructNative(Defaults);
|
||||
DThinker::bSerialOverride = s;
|
||||
// We must unlink the defaults from the class list because it's just a static block of data to the engine.
|
||||
DObject *optr = (DObject*)Defaults;
|
||||
GC::Root = optr->ObjNext;
|
||||
|
|
|
@ -56,7 +56,6 @@ DThinker *NextToThink;
|
|||
|
||||
FThinkerList DThinker::Thinkers[MAX_STATNUM+2];
|
||||
FThinkerList DThinker::FreshThinkers[MAX_STATNUM+1];
|
||||
bool DThinker::bSerialOverride = false;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
@ -101,7 +101,6 @@ public:
|
|||
static void MarkRoots();
|
||||
|
||||
static DThinker *FirstThinker (int statnum);
|
||||
static bool bSerialOverride;
|
||||
|
||||
FLevelLocals *Level;
|
||||
|
||||
|
|
|
@ -986,7 +986,6 @@ void FSerializer::ReadObjects(bool hubtravel)
|
|||
// Do not link any thinker that's being created here. This will be done by deserializing the thinker list later.
|
||||
try
|
||||
{
|
||||
DThinker::bSerialOverride = true;
|
||||
r->mDObjects.Resize(ArraySize());
|
||||
for (auto &p : r->mDObjects)
|
||||
{
|
||||
|
@ -1051,7 +1050,6 @@ void FSerializer::ReadObjects(bool hubtravel)
|
|||
}
|
||||
EndArray();
|
||||
|
||||
DThinker::bSerialOverride = false;
|
||||
assert(!founderrors);
|
||||
if (founderrors)
|
||||
{
|
||||
|
@ -1069,7 +1067,6 @@ void FSerializer::ReadObjects(bool hubtravel)
|
|||
r->mDObjects.Clear();
|
||||
|
||||
// make sure this flag gets unset, even if something in here throws an error.
|
||||
DThinker::bSerialOverride = false;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue