1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Only fly through walls in noclip mode wich requires the noclip privilege

This commit is contained in:
PilzAdam 2012-12-09 13:34:16 +01:00
parent 1d13d106dd
commit 52ba413185
5 changed files with 31 additions and 3 deletions

View file

@ -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();