- 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
parent 6715b84d0d
commit 4096939f72
3 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,7 @@
March 13, 2008 (Changes by Graf Zahl)
- Fixed: Pointer substitution changed the pointers for the thinker ring list
resulting in a freeze.
March 12, 2008
- Fixed: DACSThinker::ActiveThinker was missing a read barrier.
- Loading a save game now initiates a collection.

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)

View file

@ -69,6 +69,7 @@ public:
virtual ~DThinker ();
virtual void Tick ();
virtual void PostBeginPlay (); // Called just before the first tick
void PointerSubstitution(DObject *old, DObject *notOld);
void ChangeStatNum (int statnum);