From ade6319a3c6ce894c68e1b06ae8936615bddaad2 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 22 May 2006 22:02:13 +0000 Subject: [PATCH] - Fixed: The new Thing_ChangeTID check would infinite loop if an actor scheduled for destruction was encountered. SVN r137 (trunk) --- docs/rh-log.txt | 4 ++++ src/p_lnspec.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 18c737ded..15625c569 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +May 22, 2006 +- Fixed: The new Thing_ChangeTID check would infinite loop if an actor + scheduled for destruction was encountered. + May 22, 2006 (Changes by Graf Zahl) - Fixed: Thing_ChangeTid must check whether the actor whose tid is about to be changed is scheduled for destruction. diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 123f29d47..03e7a2bf0 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -900,11 +900,11 @@ FUNC(LS_Thing_ChangeTID) next = iterator.Next (); while (next != NULL) { - if (!(next->ObjectFlags & OF_MassDestruction)) - { - actor = next; - next = iterator.Next (); + actor = next; + next = iterator.Next (); + if (!(actor->ObjectFlags & OF_MassDestruction)) + { actor->RemoveFromHash (); actor->tid = arg1; actor->AddToHash ();