Project

General

Profile

Bug #2261

Mobj cross-references not always fully restored after loading a save

Added by skyjake over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Defect
Target version:
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

Related to Bug #1821: [Hexen] Monsters do not always awaken (Seven Portals and elsewhere)Progressed2014-06-14

Related to Bug #2068: [HeXen] Badguys not retaining alerted status upon return to a mapNew2015-05-21

Associated revisions

Revision f3da67e9 (diff)
Added by skyjake over 6 years ago

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

History

#1 Updated by skyjake over 6 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

#2 Updated by skyjake over 6 years ago

This may be closely related to various reported issues such as #2227, #1821 and #2068.

#3 Updated by skyjake over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#4 Updated by skyjake over 6 years ago

  • Related to Bug #1821: [Hexen] Monsters do not always awaken (Seven Portals and elsewhere) added

#5 Updated by skyjake over 5 years ago

  • Related to Bug #2275: [Hexen] SIGSEGV in Mobj_PrivateID when returning from Wastelands to Shadow Wood added

#6 Updated by skyjake over 5 years ago

  • Related to deleted (Bug #2275: [Hexen] SIGSEGV in Mobj_PrivateID when returning from Wastelands to Shadow Wood)

#7 Updated by skyjake over 5 years ago

  • Related to Bug #2068: [HeXen] Badguys not retaining alerted status upon return to a map added

#8 Updated by skyjake over 5 years ago

  • Target version changed from 72 to 2.1 (Late 2018)

#9 Updated by skyjake over 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF