Add FrozenActor target type.

This commit is contained in:
Paul Chote
2013-08-08 14:34:49 +12:00
parent c0cb52a5ca
commit 40a9caddc7
5 changed files with 59 additions and 28 deletions

View File

@@ -216,13 +216,15 @@ namespace OpenRA.Mods.RA
public bool CanTarget(Actor self, Target target, List<Actor> othersAtTarget, TargetModifiers modifiers, ref string cursor)
{
if (target.Type == TargetType.Actor)
switch (target.Type)
{
case TargetType.Actor:
return CanTargetActor(self, target.Actor, modifiers, ref cursor);
if (target.Type == TargetType.Terrain)
case TargetType.Terrain:
return CanTargetLocation(self, target.CenterPosition.ToCPos(), othersAtTarget, modifiers, ref cursor);
return false;
default:
return false;
}
}
public bool IsQueued { get; protected set; }