From fc4f197386f989fce5ab02c5ef99002448cce7fe Mon Sep 17 00:00:00 2001 From: ZblCoder Date: Wed, 31 Dec 2014 19:12:48 +0000 Subject: [PATCH] LaserTank fix menu pause git-svn-id: svn://kolibrios.org@5340 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/games/LaserTank/trunk/LaserTank.cpp | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/programs/games/LaserTank/trunk/LaserTank.cpp b/programs/games/LaserTank/trunk/LaserTank.cpp index cff9d41927..dc0b9c56ae 100644 --- a/programs/games/LaserTank/trunk/LaserTank.cpp +++ b/programs/games/LaserTank/trunk/LaserTank.cpp @@ -929,7 +929,7 @@ void player_move(Point vector, float angle) void key_press(int key) { //rtlDebugOutString(ftoa(key)); - + switch (gameMode) { case MODE_MENU: @@ -992,19 +992,19 @@ void key_press(int key) case MODE_PAUSE: if (key == 27) SetMode(MODE_LEVELS); - else - if ((key == 32 || key == 13) && (gameStatus == GAME_NONE || (gameStatus == GAME_VICTORY && levelIndex < (levelCount - 1)))) - { - if (gameStatus == GAME_VICTORY) - openLevel(levelIndex + 1); - SetMode(MODE_GAME); - } - else - if (key == 114) - { - openLevel(levelIndex); - SetMode(MODE_GAME); - } + + if ((key == 32 || key == 13) && (gameStatus == GAME_NONE || (gameStatus == GAME_VICTORY && levelIndex < (levelCount - 1)))) + { + if (gameStatus == GAME_VICTORY) + openLevel(levelIndex + 1); + SetMode(MODE_GAME); + } + + if (key == 114 || (gameStatus == GAME_DEFEAT && (key == 32 || key == 13))) + { + openLevel(levelIndex); + SetMode(MODE_GAME); + } break; case MODE_GAME: switch (key)