- Fixed: Pointer substitution changed the pointers for the thinker ring list

resulting in a freeze.


SVN r802 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-13 10:06:53 +00:00
commit 4096939f72
3 changed files with 17 additions and 1 deletions

View file

@ -435,6 +435,17 @@ void DThinker::Tick ()
{
}
void DThinker::PointerSubstitution(DObject *old, DObject *notOld)
{
// Pointer substitution must not, under any circumstances, change
// the linked thinker list or the game will freeze badly.
DThinker *next = NextThinker;
DThinker *prev = PrevThinker;
Super::PointerSubstitution(old, notOld);
NextThinker = next;
PrevThinker = prev;
}
FThinkerIterator::FThinkerIterator (const PClass *type, int statnum)
{
if ((unsigned)statnum > MAX_STATNUM)