Make Tick return bool

This commit is contained in:
tovl
2019-05-14 21:13:25 +02:00
committed by teinarss
parent 09c1611239
commit 3790169db9
49 changed files with 328 additions and 318 deletions

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Activities
acceleration = self.World.SharedRandom.Next(2) * 2 - 1;
}
public override Activity Tick(Actor self)
public override bool Tick(Actor self)
{
if (self.World.Map.DistanceAboveTerrain(self.CenterPosition).Length <= 0)
{
@@ -43,7 +43,8 @@ namespace OpenRA.Mods.Common.Activities
}
self.Kill(self);
return null;
Cancel(self);
return true;
}
if (info.Spins)
@@ -56,7 +57,7 @@ namespace OpenRA.Mods.Common.Activities
move -= new WVec(WDist.Zero, WDist.Zero, info.Velocity);
aircraft.SetPosition(self, aircraft.CenterPosition + move);
return this;
return false;
}
}
}