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:
parent
1d13d106dd
commit
52ba413185
5 changed files with 31 additions and 3 deletions
17
src/game.cpp
17
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue