]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/PerformAttacks.cpp
put animations in place
[l2e.git] / src / battle / states / PerformAttacks.cpp
index 15c4feba5ab0633cd0acf638ebc1aa0ea2b28d3e..05227e6e4065f512aef1af9bb7cabfd053076bb2 100644 (file)
@@ -121,11 +121,17 @@ void PerformAttacks::HandleEvents(const Input &input) {
                                moveAnimation.Clear();
                                break;
                }
-               hero.SetAnimation(moveAnimation);
        }
 
        if (titleBarText) titleBarTimer = GraphicsTimers().StartCountdown(850);
-       if (moveAnimation.Valid()) moveAnimation.Start(*this);
+       if (moveAnimation.Valid()) {
+               moveAnimation.Start(*this);
+               if (battle->CurrentAttack().isMonster) {
+                       battle->MonsterAt(battle->CurrentAttack().index).SetAnimation(moveAnimation);
+               } else {
+                       battle->HeroAt(battle->CurrentAttack().index).SetAnimation(moveAnimation);
+               }
+       }
        if (targetAnimation.Valid()) {
                targetAnimationTimer = GraphicsTimers().StartCountdown(150);
        } else {