From 1c1b209e313f361b8001666e0cbabfd9674ad7ac Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 5 Mar 2021 11:54:32 +1100 Subject: [PATCH] Fix NPC behaviors (#3509) Co-authored-by: Metal Gear Sloth --- Content.Server/AI/Utility/AiLogic/UtilityAI.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs index f402aedc95..de3347f918 100644 --- a/Content.Server/AI/Utility/AiLogic/UtilityAI.cs +++ b/Content.Server/AI/Utility/AiLogic/UtilityAI.cs @@ -84,13 +84,8 @@ namespace Content.Server.AI.Utility.AiLogic if (BehaviorSets.Count > 0) { var behaviorManager = IoCManager.Resolve(); - - 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();