(1c5ab9230) Enemies don't attack outposts or targets inside it anymore.

This commit is contained in:
Joonas Rikkonen
2019-04-05 16:11:44 +03:00
parent e84203781e
commit 7007804063
2 changed files with 7 additions and 14 deletions
@@ -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
/// <summary>
/// Adds the message to the single player chatbox.
/// </summary>
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<WifiComponent>();
}
private IEnumerable<object> KillCharacterAnim(GUIComponent component)
@@ -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;