tidy up disabled handling

This commit is contained in:
Chris Forbes
2012-04-06 19:34:43 +12:00
parent aa21ddaa4d
commit 10c1b996ed
9 changed files with 36 additions and 41 deletions

View File

@@ -81,8 +81,7 @@ namespace OpenRA.Mods.RA
{
if( IsCanceled || !target.IsValid ) return NextActivity;
if (self.TraitsImplementing<IDisable>().Any(d => d.Disabled))
return this;
if (self.IsDisabled()) return this;
var attack = self.Trait<AttackTurreted>();
const int RangeTolerance = 1; /* how far inside our maximum range we should try to sit */