X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.cpp;h=03cbb213623b26bf9cd0383dcfd2a26f7c95b9ad;hb=bbf7120b50c68867fe48844abc93ff1383bf5ec7;hp=6aeaae5f7e4ee98ac845c79c26f558abefba03c4;hpb=c484a03fda545a6803be63aa0a35f23c26cc8e2f;p=l2e.git diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index 6aeaae5..03cbb21 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -266,8 +266,14 @@ void BattleState::RenderMonsters(SDL_Surface *screen, const Vector &offset) void BattleState::RenderHeroes(SDL_Surface *screen, const Vector &offset) { for (int i(0); i < numHeroes; ++i) { - int row(heroes[i].Health() > 0 ? 0 : 2); - heroes[i].Sprite()->DrawCenterBottom(screen, heroesPositions[i] + offset, 1, row); + if (heroes[i].AttackAnimation() && heroes[i].AttackAnimation()->Running()) { + heroes[i].AttackAnimation()->DrawCenterBottom(screen, heroesPositions[i] + offset); + } else if (heroes[i].SpellAnimation() && heroes[i].SpellAnimation()->Running()) { + heroes[i].SpellAnimation()->DrawCenterBottom(screen, heroesPositions[i] + offset); + } else { + int row(heroes[i].Health() > 0 ? 0 : 2); + heroes[i].Sprite()->DrawCenterBottom(screen, heroesPositions[i] + offset, 1, row); + } } }