- titleBarText = hero.HasWeapon() ? hero.Weapon()->Name() : "Melee attack!";
- moveAnimation = hero.AttackAnimation();
+ if (hero.HasWeapon()) {
+ titleBarText = hero.Weapon()->Name();
+ moveAnimation = hero.AttackAnimation();
+ } else {
+ titleBarText = "Melee attack!";
+ if (hero.MeleeAnimation()) {
+ moveAnimation = 0;
+ attackAnimation = hero.MeleeAnimation();
+ } else {
+ moveAnimation = hero.AttackAnimation();
+ attackAnimation = 0;
+ }
+ }