From 70078040633fb67b482a6279c412af082f44b6e9 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Fri, 5 Apr 2019 16:11:44 +0300 Subject: [PATCH] (1c5ab9230) Enemies don't attack outposts or targets inside it anymore. --- .../Source/GameSession/CrewManager.cs | 19 +++++-------------- .../Source/Characters/AI/EnemyAIController.cs | 2 ++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 2cce3c5f4..cff89884e 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -74,6 +74,10 @@ namespace Barotrauma break; } } + + screenResolution = new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight); + + prevUIScale = GUI.Scale; } partial void InitProjectSpecific() @@ -593,20 +597,7 @@ namespace Barotrauma characterListBox.BarScroll -= characterListBox.BarScroll % step; characterListBox.BarScroll += dir * step; - #region Dialog - /// - /// Adds the message to the single player chatbox. - /// - public void AddSinglePlayerChatMessage(string senderName, string text, ChatMessageType messageType, Character sender) - { - if (!isSinglePlayer) - { - DebugConsole.ThrowError("Cannot add messages to single player chat box in multiplayer mode!\n" + Environment.StackTrace); - return; - } - if (string.IsNullOrEmpty(text)) { return; } - - chatBox.AddMessage(ChatMessage.Create(senderName, text, messageType, sender)); + return radioItem.GetComponent(); } private IEnumerable KillCharacterAnim(GUIComponent component) diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs index a30bf012b..fab1137c8 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs @@ -1062,6 +1062,8 @@ namespace Barotrauma { continue; } + // Don't attack outposts. + if (target.Entity.Submarine != null && target.Entity.Submarine.IsOutpost) { continue; } Character targetCharacter = target.Entity as Character;