From 22b76135023a913750e788b3ff67948231472cbe Mon Sep 17 00:00:00 2001 From: Marek Moeckel Date: Sat, 8 Apr 2006 23:53:28 +0000 Subject: [PATCH] added commands: "restart" to restart current level, and a placeholder for "quit" SVN-Revision: 3274 --- src/game_session.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/game_session.cpp b/src/game_session.cpp index 448ea5ea3..dd335c599 100644 --- a/src/game_session.cpp +++ b/src/game_session.cpp @@ -93,7 +93,9 @@ namespace { "kill", "gotoend", "flip", - "finish" + "finish", + "restart", + "quit" }; } @@ -405,6 +407,10 @@ GameSession::consoleCommand(std::string command) tux.kill(tux.KILL); return true; } + if (command == "restart") { + restart_level(true); + return true; + } if (command == "whereami") { msg_info("You are at x " << tux.get_pos().x << ", y " << tux.get_pos().y); return true; @@ -432,6 +438,10 @@ GameSession::consoleCommand(std::string command) << Sector::current()->camera->get_translation().y); return true; } + if (command == "quit") { + msg_info("Please implement me! :-)"); + return true; + } return false; } -- 2.11.0