void BattleState::RenderHeroes(SDL_Surface *screen, const Vector<int> &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 (HeroAnimationAt(i).Running()) {
+ HeroAnimationAt(i).DrawCenterBottom(screen, heroesPositions[i] + offset);
+ } else {
+ int row(heroes[i].Health() > 0 ? 0 : 2);
+ heroes[i].Sprite()->DrawCenterBottom(screen, heroesPositions[i] + offset, 1, row);
+ }
}
}