From 52ba413185f96add259c480a68f5dffa389e80f4 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 9 Dec 2012 13:34:16 +0100 Subject: Only fly through walls in noclip mode wich requires the noclip privilege --- src/game.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 9cd460922..dbb71369f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1665,6 +1665,23 @@ void the_game( statustext += L" (note: no 'fast' privilege)"; } } + else if(input->wasKeyDown(getKeySetting("keymap_noclip"))) + { + if(g_settings->getBool("noclip")) + { + g_settings->set("noclip","false"); + statustext = L"noclip disabled"; + statustext_time = 0; + } + else + { + g_settings->set("noclip","true"); + statustext = L"noclip enabled"; + statustext_time = 0; + if(!client.checkPrivilege("noclip")) + statustext += L" (note: no 'noclip' privilege)"; + } + } else if(input->wasKeyDown(getKeySetting("keymap_screenshot"))) { irr::video::IImage* const image = driver->createScreenShot(); -- cgit v1.2.3