Fix map-placed SAM sites
This commit is contained in:
@@ -50,13 +50,7 @@ namespace OpenRA.Mods.Cnc
|
|||||||
Info = info;
|
Info = info;
|
||||||
Turret = init.self.Trait<Turreted>();
|
Turret = init.self.Trait<Turreted>();
|
||||||
if (init.Contains<SkipMakeAnimsInit>())
|
if (init.Contains<SkipMakeAnimsInit>())
|
||||||
{
|
|
||||||
State = PopupState.Closed;
|
|
||||||
init.self.Trait<RenderBuilding>()
|
|
||||||
.PlayCustomAnimRepeating(init.self, "closed-idle");
|
|
||||||
Turret.desiredFacing = null;
|
|
||||||
buildComplete = true;
|
buildComplete = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool CanAttack( Actor self, Target target )
|
protected override bool CanAttack( Actor self, Target target )
|
||||||
@@ -130,7 +124,18 @@ namespace OpenRA.Mods.Cnc
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool buildComplete = false;
|
bool buildComplete = false;
|
||||||
public void BuildingComplete(Actor self) { buildComplete = true; }
|
public void BuildingComplete(Actor self)
|
||||||
|
{
|
||||||
|
// Set true for SkipMakeAnimsInit
|
||||||
|
if (buildComplete)
|
||||||
|
{
|
||||||
|
State = PopupState.Closed;
|
||||||
|
self.Trait<RenderBuilding>()
|
||||||
|
.PlayCustomAnimRepeating(self, "closed-idle");
|
||||||
|
Turret.desiredFacing = null;
|
||||||
|
}
|
||||||
|
buildComplete = true;
|
||||||
|
}
|
||||||
|
|
||||||
public float GetDamageModifier(Actor attacker, WarheadInfo warhead)
|
public float GetDamageModifier(Actor attacker, WarheadInfo warhead)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user