mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Fixed: r4234 moved tic decrementing to the wrong spot.
SVN r4243 (trunk)
This commit is contained in:
parent
bed47c6eff
commit
cadc16293e
1 changed files with 7 additions and 8 deletions
|
@ -3495,8 +3495,12 @@ void AActor::Tick ()
|
|||
}
|
||||
}
|
||||
|
||||
// cycle through states, calling action functions at transitions
|
||||
assert (state != NULL);
|
||||
if (state == NULL)
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
if (ObjectFlags & OF_JustSpawned && state->GetNoDelay())
|
||||
{
|
||||
// For immediately spawned objects with the NoDelay flag set for their
|
||||
|
@ -3511,21 +3515,16 @@ void AActor::Tick ()
|
|||
tics++;
|
||||
}
|
||||
}
|
||||
// cycle through states, calling action functions at transitions
|
||||
if (tics != -1)
|
||||
{
|
||||
// [RH] Use tics <= 0 instead of == 0 so that spawnstates
|
||||
// of 0 tics work as expected.
|
||||
if (tics <= 0)
|
||||
if (--tics <= 0)
|
||||
{
|
||||
if (state == NULL)
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
if (!SetState(state->GetNextState()))
|
||||
return; // freed itself
|
||||
}
|
||||
tics--;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue