- removed all asserts from the interpolation objects' Destroy methods. The condition will not be true after a failed savegame write occured.

- fixed: D_ErrorCleanup must clear 'savegamerestore'.
- fixed: Cleaning up when loading a savegame failed while restoring the thinker list did not work. There were two issues:
  * removed the asserts in GC::SweepList because they get triggered by thinkers that were not fully initialized during loading.
  * AActor::UnlinkFromWorld may not assume that the sector list has been initialized when this function is called. 

SVN r3274 (trunk)
This commit is contained in:
Christoph Oelckers 2011-07-15 13:26:36 +00:00
commit 080e769c76
5 changed files with 30 additions and 38 deletions

View file

@ -246,26 +246,30 @@ void AActor::UnlinkFromWorld ()
// pointers, allows head node pointers to be treated like everything else
AActor **prev = sprev;
AActor *next = snext;
if ((*prev = next)) // unlink from sector list
next->sprev = prev;
snext = NULL;
sprev = (AActor **)(size_t)0xBeefCafe; // Woo! Bug-catching value!
// phares 3/14/98
//
// Save the sector list pointed to by touching_sectorlist.
// In P_SetThingPosition, we'll keep any nodes that represent
// sectors the Thing still touches. We'll add new ones then, and
// delete any nodes for sectors the Thing has vacated. Then we'll
// put it back into touching_sectorlist. It's done this way to
// avoid a lot of deleting/creating for nodes, when most of the
// time you just get back what you deleted anyway.
//
// If this Thing is being removed entirely, then the calling
// routine will clear out the nodes in sector_list.
if (prev != NULL) // prev will be NULL if this actor gets deleted due to cleaning up from a broken savegame
{
if ((*prev = next)) // unlink from sector list
next->sprev = prev;
snext = NULL;
sprev = (AActor **)(size_t)0xBeefCafe; // Woo! Bug-catching value!
sector_list = touching_sectorlist;
touching_sectorlist = NULL; //to be restored by P_SetThingPosition
// phares 3/14/98
//
// Save the sector list pointed to by touching_sectorlist.
// In P_SetThingPosition, we'll keep any nodes that represent
// sectors the Thing still touches. We'll add new ones then, and
// delete any nodes for sectors the Thing has vacated. Then we'll
// put it back into touching_sectorlist. It's done this way to
// avoid a lot of deleting/creating for nodes, when most of the
// time you just get back what you deleted anyway.
//
// If this Thing is being removed entirely, then the calling
// routine will clear out the nodes in sector_list.
sector_list = touching_sectorlist;
touching_sectorlist = NULL; //to be restored by P_SetThingPosition
}
}
if (!(flags & MF_NOBLOCKMAP))