eliminated some dumb stuff

This commit is contained in:
Chris Forbes
2009-12-31 13:20:20 +13:00
parent c11c4eb4a0
commit 52dea029d6
3 changed files with 16 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ namespace OpenRa.Game.Traits
void Complete( Actor self )
{
anim.PlayRepeating( "idle" );
anim.PlayRepeating( GetPrefix(self) + "idle" );
foreach( var x in self.traits.WithInterface<INotifyBuildComplete>() )
x.BuildingComplete( self );
}
@@ -51,6 +51,11 @@ namespace OpenRa.Game.Traits
}
}
protected string GetPrefix(Actor self)
{
return self.GetDamageState() == DamageState.Half ? "damaged-" : "";
}
public virtual void Damaged(Actor self, AttackInfo e)
{
if (!e.DamageStateChanged)