diff options
author | PilzAdam <adam-k@outlook.com> | 2012-12-09 13:34:16 +0100 |
---|---|---|
committer | PilzAdam <adam-k@outlook.com> | 2012-12-11 16:44:13 +0100 |
commit | 52ba413185f96add259c480a68f5dffa389e80f4 (patch) | |
tree | a20aafa92b5ce3ad22eb2074afc4aea30d09260c /src/game.cpp | |
parent | 1d13d106dd58cd18a019046840c180da25001b02 (diff) | |
download | dragonfireclient-52ba413185f96add259c480a68f5dffa389e80f4.tar.xz |
Only fly through walls in noclip mode wich requires the noclip privilege
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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(); |