X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.cpp;h=1f68acfa8bf05576202233639e008bc0d31d0c43;hb=e1dab8a680a76f8621e967a693dbf2b481ba8f75;hp=a17732ca8c612c0c3bc810d46c73050e491e46d6;hpb=8f4e771181491f1d83ce0c907b8dda0fbbe0ce93;p=l2e.git diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index a17732c..1f68acf 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -3,6 +3,7 @@ #include "PartyLayout.h" #include "states/SelectMoveAction.h" #include "states/PerformAttacks.h" +#include "states/VictoryState.h" #include "../app/Application.h" #include "../app/Input.h" #include "../common/GameState.h" @@ -119,7 +120,12 @@ void BattleState::OnResumeState(SDL_Surface *screen) { return; } if (battle.Victory()) { - Ctrl().PopState(); + if (alreadyPushed) { + Ctrl().PopState(); + } else { + Ctrl().PushState(new VictoryState(&battle, this)); + alreadyPushed = true; + } return; } if (battle.Defeat()) {