fix IdleAnimation. add IsAttacking to AttackBase

This commit is contained in:
Bob
2010-09-22 12:21:49 +12:00
parent 694fb6831a
commit d8de477edb
5 changed files with 12 additions and 6 deletions

View File

@@ -24,13 +24,11 @@ namespace OpenRA.Mods.RA.Render
public override void Tick(Actor self)
{
var isAttacking = self.GetCurrentActivity() is Attack;
var attack = self.TraitOrDefault<AttackBase>();
if (attack != null)
anim.ReplaceAnim((attack.IsReloading() ? "empty-" : "")
+ (isAttacking ? "aim" : "idle"));
+ (attack.IsAttacking ? "aim" : "idle"));
base.Tick(self);
}
}