Fixed D2K turrets.

This commit is contained in:
atlimit8
2014-07-25 19:53:23 -05:00
parent 72a30e2157
commit 4d23b71f2c
2 changed files with 4 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ namespace OpenRA.Mods.RA.Buildings
public bool BuildComplete { get; private set; } public bool BuildComplete { get; private set; }
[Sync] readonly CPos topLeft; [Sync] readonly CPos topLeft;
readonly Actor self; readonly Actor self;
public readonly bool UseMakeAnimation; public readonly bool SkipMakeAnimation;
PowerManager PlayerPower; PowerManager PlayerPower;
@@ -141,7 +141,7 @@ namespace OpenRA.Mods.RA.Buildings
.Select(c => Pair.New(c, SubCell.FullCell)).ToArray(); .Select(c => Pair.New(c, SubCell.FullCell)).ToArray();
CenterPosition = init.world.Map.CenterOfCell(topLeft) + FootprintUtils.CenterOffset(init.world, Info); CenterPosition = init.world.Map.CenterOfCell(topLeft) + FootprintUtils.CenterOffset(init.world, Info);
UseMakeAnimation = !init.Contains<SkipMakeAnimsInit>(); SkipMakeAnimation = init.Contains<SkipMakeAnimsInit>();
} }
public int GetPowerUsage() public int GetPowerUsage()
@@ -170,7 +170,7 @@ namespace OpenRA.Mods.RA.Buildings
public void Created(Actor self) public void Created(Actor self)
{ {
if (!UseMakeAnimation) if (SkipMakeAnimation || !self.HasTrait<WithMakeAnimation>())
NotifyBuildingComplete(self); NotifyBuildingComplete(self);
} }

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA.Render
renderBuilding = self.Trait<RenderBuilding>(); renderBuilding = self.Trait<RenderBuilding>();
var building = self.Trait<Building>(); var building = self.Trait<Building>();
if (building.UseMakeAnimation) if (!building.SkipMakeAnimation)
{ {
renderBuilding.PlayCustomAnimThen(self, info.Sequence, () => renderBuilding.PlayCustomAnimThen(self, info.Sequence, () =>
{ {