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

@@ -26,6 +26,10 @@ 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;
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(25 * 2,
() => target.Kill(self))));
return NextActivity;