Buildings with special rendering now skip their make animation. Removed IsMapActor; make-skipping is now controlled by a global in Game.

This commit is contained in:
Bob
2009-11-02 00:59:53 +13:00
parent 7e1417254c
commit 1d7798d40c
9 changed files with 36 additions and 25 deletions

View File

@@ -18,14 +18,19 @@ namespace OpenRa.Game.Traits
public RenderBuilding(Actor self)
: base(self)
{
if (self.IsMapActor)
anim.PlayRepeating("idle");
else
anim.PlayThen("make", () => anim.PlayRepeating("idle"));
Make( () => anim.PlayRepeating("idle") );
DoBib(self, false);
}
protected void Make( Action after )
{
if (Game.skipMakeAnims)
after();
else
anim.PlayThen("make", after);
}
void DoBib(Actor self, bool isRemove)
{
var buildingInfo = (UnitInfo.BuildingInfo)self.unitInfo;