Bug #2261
Mobj cross-references not always fully restored after loading a save
Start date:
2017-07-28
% Done:
100%
Description
In some cases (investigate exactly when), mobj cross-references — links to other mobjs — are not fully restored after loading a saved game. This is particularly problematic in Hexen, where hubs use the save mechanism when switching between maps. This leads to various potential crashes and other gameplay issues because action functions may assume that certain pointers are valid even though they have been reset to null.
Savegames should use an improved mechanism that ensures all cross-references between objects (and thinkers?) are restored correctly. The private thinker IDs should be very helpful here, as they are persistent across saves.
Related issues
Associated revisions
History
#1 Updated by skyjake over 7 years ago
- Subject changed from Mobj cross-references to always fully restored after loading a save to Mobj cross-references not always fully restored after loading a save
#3 Updated by skyjake about 7 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
#4 Updated by skyjake about 7 years ago
- Related to Bug #1821: [Hexen] Monsters do not always awaken (Seven Portals and elsewhere) added
#5 Updated by skyjake over 6 years ago
- Related to Bug #2275: [Hexen] SIGSEGV in Mobj_PrivateID when returning from Wastelands to Shadow Wood added
#6 Updated by skyjake over 6 years ago
- Related to deleted (Bug #2275: [Hexen] SIGSEGV in Mobj_PrivateID when returning from Wastelands to Shadow Wood)
#7 Updated by skyjake over 6 years ago
- Related to Bug #2068: [HeXen] Badguys not retaining alerted status upon return to a map added
#8 Updated by skyjake about 6 years ago
- Target version changed from 72 to 2.1 (Late 2018)
#9 Updated by skyjake about 6 years ago
- Status changed from Resolved to Closed
All Games|Client|SaveGame: Restore object links via a new mechanism
After a save has been loaded, object cross-references haven't always
been correctly restored to what they were when the save was made.
The previous method of validating the cross-references was extended
to actually restore all cross-references to point to the correct
mobjs using the private thinker IDs.
While this obsoletes the cross-reference restoration done by
MapStateReaders, the old code still is necessary when loading saves
that don't contain the ObjectState info file.
Also noteworthy is that private IDs are persistent across a save
and restore.
IssueID #2261