Let AI ignore frozen actors and target original actors instead.
This commit is contained in:
@@ -42,7 +42,20 @@ namespace OpenRA.Mods.Common
|
||||
|
||||
// Bot-controlled units aren't yet capable of understanding visibility changes
|
||||
if (viewer.IsBot)
|
||||
{
|
||||
// Prevent that bot-controlled units endlessly fire at frozen actors.
|
||||
// TODO: Teach the AI to support long range artillery units with units that provide line of sight
|
||||
if (t.Type == TargetType.FrozenActor)
|
||||
{
|
||||
if (t.FrozenActor.Actor != null)
|
||||
return Target.FromActor(t.FrozenActor.Actor);
|
||||
|
||||
// Original actor was killed
|
||||
return Target.Invalid;
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
if (t.Type == TargetType.Actor)
|
||||
{
|
||||
@@ -68,7 +81,6 @@ namespace OpenRA.Mods.Common
|
||||
return Target.FromActor(t.FrozenActor.Actor);
|
||||
|
||||
// Original actor was killed while hidden
|
||||
if (t.Actor == null)
|
||||
return Target.Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user