From a2ca6ce26bd41ff15feb7a5d823976d2dcf6c670 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sun, 25 Mar 2012 11:40:43 +0000 Subject: [PATCH] treating the esc menu as "undo" when used while an abilitiesmenu is open and waiting for selection. this prevents people from using the games menu as an exploit to avoid having to do negative effects to themselves or thier cards. you either do it or we can repeat this forever :) --- projects/mtg/src/GameStateDuel.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index b3916da4a..a9e50f577 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -903,7 +903,14 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId) break; default: - + if(game->mLayers->actionLayer()->abilitiesMenu) + { + game->undo(); + menu->Close(); + setGamePhase(DUEL_STATE_CANCEL); + break; + } + else switch (controlId) {