- Fixed crash when an actor's spawn state ends by destroying the actor and the first state has

NoDelay set and it only consists of 0-tic states.

SVN r4245 (trunk)
This commit is contained in:
Randy Heit 2013-05-02 00:07:56 +00:00
parent 6d6fcbe246
commit 163d8ba3e6

View file

@ -3507,7 +3507,8 @@ void AActor::Tick ()
// Spawn state, explicitly set the current state so that it calls its
// action and chains 0-tic states.
int starttics = tics;
SetState(state);
if (!SetState(state))
return; // freed itself
// If the initial state had a duration of 0 tics, let the next state run
// normally. Otherwise, increment tics by 1 so that we don't double up ticks.
if (starttics > 0 && tics >= 0)