- fixed: Decals may not be serialized before thinkers.
Since decals may have thinkers attached this will crash when such a savegame gets loaded, because the thinker lists get reset in P_SerializeThinkers, deleting any thinker that already was processed. I also added an error message that immediately aborts the save process if such an out-of-sequence thinker is attempted to be written out. This obviously breaks savegame compatibility again...
This commit is contained in:
parent
f3d273c94f
commit
4a72c7d2f1
6 changed files with 35 additions and 7 deletions
|
|
@ -1054,6 +1054,12 @@ FArchive &FArchive::SerializePointer (void *ptrbase, BYTE **ptr, DWORD elemSize)
|
|||
|
||||
FArchive &FArchive::SerializeObject (DObject *&object, PClass *type)
|
||||
{
|
||||
if (!m_ThinkersAllowed && type->IsDescendantOf(RUNTIME_CLASS(DThinker)))
|
||||
{
|
||||
assert(true);
|
||||
I_Error("Tried to serialize a thinker before P_SerializeThinkers");
|
||||
}
|
||||
|
||||
if (!type->IsDescendantOf(RUNTIME_CLASS(PClass)))
|
||||
{ // a regular object
|
||||
if (IsStoring())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue