fix trailing whitespace everywhere
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
public readonly bool AllowMovement = true;
|
||||
public readonly int ScanRadius = -1;
|
||||
|
||||
|
||||
public object Create(ActorInitializer init) { return new AutoTarget(init.self, this); }
|
||||
}
|
||||
|
||||
@@ -27,16 +27,16 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
readonly AutoTargetInfo Info;
|
||||
readonly AttackBase attack;
|
||||
|
||||
|
||||
[Sync]
|
||||
int nextScanTime = 0;
|
||||
|
||||
|
||||
public AutoTarget(Actor self, AutoTargetInfo info)
|
||||
{
|
||||
Info = info;
|
||||
attack = self.Trait<AttackBase>();
|
||||
}
|
||||
|
||||
|
||||
public void Damaged(Actor self, AttackInfo e)
|
||||
{
|
||||
if (!self.IsIdle) return;
|
||||
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.RA
|
||||
Info.AllowMovement));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
--nextScanTime;
|
||||
@@ -74,14 +74,14 @@ namespace OpenRA.Mods.RA
|
||||
public Actor ScanForTarget(Actor self, Actor currentTarget)
|
||||
{
|
||||
var range = Info.ScanRadius > 0 ? Info.ScanRadius : attack.GetMaximumRange();
|
||||
|
||||
|
||||
if (self.IsIdle || currentTarget == null || !Combat.IsInRange(self.CenterLocation, range, currentTarget))
|
||||
if(nextScanTime <= 0)
|
||||
return ChooseTarget(self, range);
|
||||
|
||||
return currentTarget;
|
||||
}
|
||||
|
||||
|
||||
public void ScanAndAttack(Actor self, bool allowMovement, bool holdStill)
|
||||
{
|
||||
var targetActor = ScanForTarget(self, null);
|
||||
|
||||
Reference in New Issue
Block a user