Build 0.18.2.0

This commit is contained in:
Markus Isberg
2022-05-19 23:43:21 +09:00
parent d4f6f4cf88
commit 077917fa5d
115 changed files with 1080 additions and 1763 deletions
@@ -313,10 +313,14 @@ namespace Barotrauma
bool isValid = e is Character character && !character.Removed && !character.IsDead && !character.IsIncapacitated &&
(e == Character.Controlled || character.IsRemotePlayer);
#if SERVER
UpdateIgnoredClients();
isValid &= !ignoredClients.Keys.Any(c => c.Character == e);
if (!dialogOpened)
{
UpdateIgnoredClients();
isValid &= !ignoredClients.Keys.Any(c => c.Character == e);
}
#elif CLIENT
isValid &= (e != Character.Controlled || !GUI.InputBlockingMenuOpen);
bool block = GUI.InputBlockingMenuOpen && !dialogOpened;
isValid &= (e != Character.Controlled || !block);
#endif
return isValid;
}
@@ -135,8 +135,10 @@ namespace Barotrauma
monster.Enabled = false;
if (monster.Params.AI != null && monster.Params.AI.EnforceAggressiveBehaviorForMissions)
{
monster.Params.AI.FleeHealthThreshold = 0;
foreach (var targetParam in monster.Params.AI.Targets)
{
if (targetParam.Tag.Equals("engine", StringComparison.OrdinalIgnoreCase)) { continue; }
switch (targetParam.State)
{
case AIState.Avoid:
@@ -12,6 +12,7 @@ namespace Barotrauma
private readonly Dictionary<Identifier, List<Entity>> cachedTargets = new Dictionary<Identifier, List<Entity>>();
private int prevEntityCount;
private int prevPlayerCount, prevBotCount;
private Character prevControlled;
private readonly string[] requiredDestinationTypes;
public readonly bool RequireBeaconStation;
@@ -163,12 +164,13 @@ namespace Barotrauma
botCount++;
}
}
if (Entity.EntityCount != prevEntityCount || botCount != prevBotCount || playerCount != prevPlayerCount)
if (Entity.EntityCount != prevEntityCount || botCount != prevBotCount || playerCount != prevPlayerCount || prevControlled != Character.Controlled)
{
cachedTargets.Clear();
prevEntityCount = Entity.EntityCount;
prevBotCount = botCount;
prevPlayerCount = playerCount;
prevControlled = Character.Controlled;
}
if (!Actions.Any())