Quick fix for #87, #88. Real fix will come when we nest activities.

This commit is contained in:
Paul Chote
2010-09-15 20:59:42 +12:00
committed by Chris Forbes
parent d15ab79370
commit e9f34b1e21
2 changed files with 7 additions and 1 deletions

View File

@@ -23,7 +23,9 @@ namespace OpenRA.Mods.RA.Activities
public IActivity Tick(Actor self)
{
if (target == null || target.IsDead()) return NextActivity;
if ((target.Location - self.Location).Length > 1)
return NextActivity;
target.World.AddFrameEndTask(w =>
{
// momentarily remove from world so the ownership queries don't get confused