Fixed: Possible invalid processing for Crash states that immediately destroy the actor

- Setting an actor's Crash state has the potential to destroy the actor if
  the Crash state has one or more 0-tic states that end with Stop. This
  was not taken into account when the object's Z velocity was 0, but it
  was under the floor anyway.
This commit is contained in:
Marisa Heit 2016-10-15 21:14:34 -05:00
parent 58ec0e4594
commit ae14993ba4

View file

@ -3799,6 +3799,8 @@ void AActor::Tick ()
else if (Z() <= floorz) else if (Z() <= floorz)
{ {
Crash(); Crash();
if (ObjectFlags & OF_EuthanizeMe)
return; // actor was destroyed
} }
CheckPortalTransition(true); CheckPortalTransition(true);