Fix NPC shutdown crash (#2971)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Content.Server.AI.Utility.Actions
|
||||
{
|
||||
Owner = owner;
|
||||
}
|
||||
|
||||
|
||||
public virtual void Shutdown() {}
|
||||
|
||||
/// <summary>
|
||||
@@ -78,7 +78,7 @@ namespace Content.Server.AI.Utility.Actions
|
||||
return Outcome.Success;
|
||||
}
|
||||
|
||||
op.TryStartup();
|
||||
op.Startup();
|
||||
var outcome = op.Execute(frameTime);
|
||||
|
||||
switch (outcome)
|
||||
@@ -116,7 +116,7 @@ namespace Content.Server.AI.Utility.Actions
|
||||
// Overall structure is based on Building a better centaur
|
||||
// Ideally we should early-out each action as cheaply as possible if it's not valid, thus
|
||||
// the finalScore can only go down over time.
|
||||
|
||||
|
||||
var finalScore = 1.0f;
|
||||
var minThreshold = min / Bonus;
|
||||
context.GetState<ConsiderationState>().SetValue(considerations.Count);
|
||||
|
||||
Reference in New Issue
Block a user