Bugfixes: Oremine, Airfield, Prerequisites

This commit is contained in:
Paul Chote
2010-02-06 15:17:38 +13:00
parent b3a0ff0e81
commit 6af9bf4d32
5 changed files with 25 additions and 7 deletions

View File

@@ -9,13 +9,21 @@ namespace OpenRa.Traits.Activities
{
readonly float2 Pos;
bool isCanceled;
Actor Structure;
public Land(float2 pos) { Pos = pos; }
public Land(Actor structure) { Structure = structure; Pos = Structure.CenterLocation; }
public IActivity NextActivity { get; set; }
public IActivity Tick(Actor self)
{
if (Structure != null && Structure.IsDead)
{
Structure = null;
isCanceled = true;
}
if (isCanceled) return NextActivity;
var d = Pos - self.CenterLocation;