Fixes #7764, #7780 and other potential regressions introduced by #7671.

This commit is contained in:
reaperrr
2015-03-29 18:26:55 +02:00
parent 0b4ec5a815
commit 83b702343e
7 changed files with 13 additions and 18 deletions

View File

@@ -36,7 +36,6 @@ namespace OpenRA.Mods.Common.Traits
public class Helicopter : Aircraft, ITick, IResolveOrder, IMove
{
public readonly HelicopterInfo Info;
readonly bool fallsToEarth;
Actor self;
bool firstTick = true;
public bool IsMoving { get { return self.CenterPosition.Z > 0; } set { } }
@@ -46,7 +45,6 @@ namespace OpenRA.Mods.Common.Traits
{
self = init.Self;
Info = info;
fallsToEarth = self.HasTrait<FallsToEarth>();
}
public void ResolveOrder(Actor self, Order order)
@@ -132,7 +130,7 @@ namespace OpenRA.Mods.Common.Traits
if (firstTick)
{
firstTick = false;
if (!fallsToEarth) // TODO: Aircraft husks don't properly unreserve.
if (!self.HasTrait<FallsToEarth>()) // TODO: Aircraft husks don't properly unreserve.
ReserveSpawnBuilding();
var host = GetActorBelow();

View File

@@ -26,7 +26,6 @@ namespace OpenRA.Mods.Common.Traits
public class Plane : Aircraft, IResolveOrder, IMove, ITick, ISync
{
public readonly PlaneInfo Info;
readonly bool fallsToEarth;
[Sync] public WPos RTBPathHash;
Actor self;
public bool IsMoving { get { return self.CenterPosition.Z > 0; } set { } }
@@ -36,7 +35,6 @@ namespace OpenRA.Mods.Common.Traits
{
self = init.Self;
Info = info;
fallsToEarth = self.HasTrait<FallsToEarth>();
}
bool firstTick = true;
@@ -45,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits
if (firstTick)
{
firstTick = false;
if (!fallsToEarth) // TODO: Aircraft husks don't properly unreserve.
if (!self.HasTrait<FallsToEarth>()) // TODO: Aircraft husks don't properly unreserve.
ReserveSpawnBuilding();
var host = GetActorBelow();