mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +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);
|
assert (state != NULL);
|
||||||
|
if (state == NULL)
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (ObjectFlags & OF_JustSpawned && state->GetNoDelay())
|
if (ObjectFlags & OF_JustSpawned && state->GetNoDelay())
|
||||||
{
|
{
|
||||||
// For immediately spawned objects with the NoDelay flag set for their
|
// For immediately spawned objects with the NoDelay flag set for their
|
||||||
|
@ -3511,21 +3515,16 @@ void AActor::Tick ()
|
||||||
tics++;
|
tics++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// cycle through states, calling action functions at transitions
|
||||||
if (tics != -1)
|
if (tics != -1)
|
||||||
{
|
{
|
||||||
// [RH] Use tics <= 0 instead of == 0 so that spawnstates
|
// [RH] Use tics <= 0 instead of == 0 so that spawnstates
|
||||||
// of 0 tics work as expected.
|
// of 0 tics work as expected.
|
||||||
if (tics <= 0)
|
if (--tics <= 0)
|
||||||
{
|
{
|
||||||
if (state == NULL)
|
|
||||||
{
|
|
||||||
Destroy();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!SetState(state->GetNextState()))
|
if (!SetState(state->GetNextState()))
|
||||||
return; // freed itself
|
return; // freed itself
|
||||||
}
|
}
|
||||||
tics--;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue