From 6fc291a634397ba4c34ad4a8cbe03bcda3c0c3c9 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 31 Dec 2018 14:46:57 +0000 Subject: [PATCH] Disable target recalculation for bots. This fixes bot-controlled units freezing when they lock on to units that aren't visible. --- OpenRA.Mods.Common/Activities/Attack.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.Common/Activities/Attack.cs b/OpenRA.Mods.Common/Activities/Attack.cs index 319913c2b7..ad1fc5cb40 100644 --- a/OpenRA.Mods.Common/Activities/Attack.cs +++ b/OpenRA.Mods.Common/Activities/Attack.cs @@ -158,6 +158,10 @@ namespace OpenRA.Mods.Common.Activities if (t.Type == TargetType.Invalid && t.Actor != null && t.Actor.ReplacedByActor != null) t = Target.FromActor(t.Actor.ReplacedByActor); + // Bot-controlled units aren't yet capable of understanding visibility changes + if (viewer.IsBot) + return t; + if (t.Type == TargetType.Actor) { // Actor has been hidden under the fog