X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FTargetSelection.cpp;h=b24772d55937820732ad0b356f76ab5b13c55cf3;hb=9cfff98ffce0529c685fbd5aa52e213c295449a1;hp=2608e3976d6def49126654de419d21316cd7073f;hpb=a01c2f05b5a6493d7fe097eb15e5337a095992ae;p=l2e.git diff --git a/src/battle/TargetSelection.cpp b/src/battle/TargetSelection.cpp index 2608e39..b24772d 100644 --- a/src/battle/TargetSelection.cpp +++ b/src/battle/TargetSelection.cpp @@ -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; } }