Fix NPC shutdown crash (#2971)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -17,9 +17,9 @@ namespace Content.Server.AI.Operators.Sequences
|
||||
{
|
||||
return Outcome.Success;
|
||||
}
|
||||
|
||||
|
||||
var op = Sequence.Peek();
|
||||
op.TryStartup();
|
||||
op.Startup();
|
||||
var outcome = op.Execute(frameTime);
|
||||
|
||||
switch (outcome)
|
||||
@@ -35,10 +35,10 @@ namespace Content.Server.AI.Operators.Sequences
|
||||
op.Shutdown(outcome);
|
||||
Sequence.Clear();
|
||||
return Outcome.Failed;
|
||||
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user