fixes turrets trying to move
This commit is contained in:
@@ -19,7 +19,10 @@ namespace OpenRa.Game.Traits.Activities
|
||||
if (Target == null || Target.IsDead)
|
||||
return NextActivity;
|
||||
|
||||
if( ( Target.Location - self.Location ).LengthSquared >= Range * Range )
|
||||
var canMove = !self.traits.Contains<Building>();
|
||||
var inRange = ( Target.Location - self.Location ).LengthSquared < Range * Range;
|
||||
|
||||
if( canMove && !inRange )
|
||||
return new Move( Target, Range ) { NextActivity = this };
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user