mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 23:21:41 +00:00
- 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:
parent
6d6fcbe246
commit
163d8ba3e6
1 changed files with 2 additions and 1 deletions
|
@ -3507,7 +3507,8 @@ void AActor::Tick ()
|
||||||
// Spawn state, explicitly set the current state so that it calls its
|
// Spawn state, explicitly set the current state so that it calls its
|
||||||
// action and chains 0-tic states.
|
// action and chains 0-tic states.
|
||||||
int starttics = tics;
|
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
|
// 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.
|
// normally. Otherwise, increment tics by 1 so that we don't double up ticks.
|
||||||
if (starttics > 0 && tics >= 0)
|
if (starttics > 0 && tics >= 0)
|
||||||
|
|
Loading…
Reference in a new issue