From: Marek Moeckel Date: Sat, 8 Apr 2006 23:53:28 +0000 (+0000) Subject: added commands: "restart" to restart current level, and a placeholder for "quit" X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=22b76135023a913750e788b3ff67948231472cbe;p=supertux.git added commands: "restart" to restart current level, and a placeholder for "quit" SVN-Revision: 3274 --- 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; }