mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +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
|
||||
// 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)
|
||||
|
|
Loading…
Reference in a new issue