fixes #2660 damaged silos placed by mappers using wrong sprites

This commit is contained in:
Matthias Mailänder
2013-04-19 11:27:34 +02:00
parent 713260a49f
commit 520bb19e44

View File

@@ -30,9 +30,10 @@ namespace OpenRA.Mods.RA.Render
Info = info;
}
public void BuildingComplete( Actor self )
public void BuildingComplete(Actor self)
{
anim.PlayFetchIndex("idle",
var animation = (self.GetDamageState() >= DamageState.Heavy) ? "damaged-idle" : "idle";
anim.PlayFetchIndex(animation,
() => playerResources.OreCapacity != 0
? (Info.FillSteps * playerResources.Ore) / (10 * playerResources.OreCapacity)
: 0);