From 549069762ccc35352186eb4fe1922883a0c4f213 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Jan 2012 23:50:00 -0700 Subject: Return seems to be fixed. --- src/gamestate.cpp | 7 ++++++- src/gamestate.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gamestate.cpp b/src/gamestate.cpp index 2032d5c..57dbe2f 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp @@ -10,7 +10,8 @@ using namespace Bu; GameState::GameState( Game *pGame ) : pGame( pGame ), - bRunning( true ) + bRunning( true ), + bReturnOnly( false ) { } @@ -498,6 +499,8 @@ void GameState::parse( const AstBranch::NodeList &lCode ) break; case AstNode::tReturn: + bReturnOnly = true; + bEscape = true; return; break; @@ -536,6 +539,8 @@ void GameState::parse( const AstBranch::NodeList &lCode ) dynamic_cast(*i) ->getValue().getString() ); + bReturnOnly = false; + bEscape = false; break; // tBranch diff --git a/src/gamestate.h b/src/gamestate.h index 5c47ce0..9e7a060 100644 --- a/src/gamestate.h +++ b/src/gamestate.h @@ -54,6 +54,7 @@ private: bool bEscape; bool bRunning; + bool bReturnOnly; Bu::String sPrompt; VariableList lStack; -- cgit v1.2.3