]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/TargetSelection.cpp
run monsters' attack animation
[l2e.git] / src / battle / TargetSelection.cpp
index 2608e3976d6def49126654de419d21316cd7073f..b24772d55937820732ad0b356f76ab5b13c55cf3 100644 (file)
@@ -89,8 +89,10 @@ void TargetSelection::MoveLeft() {
 }
 
 void TargetSelection::FindNextEnemy() {
+       int start(cursor);
        while (!battle->MonsterPositionOccupied(cursor)) {
                cursor = (cursor + battle->MonsterPositions().size() - 1) % battle->MonsterPositions().size();
+               if (cursor == start) break;
        }
 }