Fix NPC behaviors (#3509)

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2021-03-05 11:54:32 +11:00
committed by GitHub
parent 5c50b1f6ed
commit 1c1b209e31

View File

@@ -84,13 +84,8 @@ namespace Content.Server.AI.Utility.AiLogic
if (BehaviorSets.Count > 0)
{
var behaviorManager = IoCManager.Resolve<INpcBehaviorManager>();
foreach (var bSet in BehaviorSets)
{
behaviorManager.AddBehaviorSet(this, bSet, false);
}
behaviorManager.RebuildActions(this);
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, new SleepAiMessage(this, false));
}
base.Initialize();