- Re-jigged DoJump() to not be recursive so that 0-tic A_Jump* loops are no longer
able to potentially blow up the stack. SVN r3902 (scripting)
This commit is contained in:
parent
47eec0b275
commit
d0c91083bc
3 changed files with 19 additions and 1 deletions
|
|
@ -482,7 +482,16 @@ bool AActor::SetState (FState *newstate, bool nofunction)
|
|||
{
|
||||
// Check whether the called action function resulted in destroying the actor
|
||||
if (ObjectFlags & OF_EuthanizeMe)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (ObjectFlags & OF_StateChanged)
|
||||
{ // The action was an A_Jump-style function that wants to change the next state.
|
||||
ObjectFlags &= ~OF_StateChanged;
|
||||
newstate = state;
|
||||
tics = 0; // make sure we loop and set the new state properly
|
||||
continue;
|
||||
}
|
||||
}
|
||||
newstate = newstate->GetNextState();
|
||||
} while (tics == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue