Disable target recalculation for bots.
This fixes bot-controlled units freezing when they lock on to units that aren't visible.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user