1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

[VR Client] Prevent use of console from meta menu

This commit is contained in:
David Cernat 2022-05-02 08:42:38 +03:00
parent d017fd1545
commit ba66031b09

View file

@ -13,6 +13,7 @@
Include additional headers for multiplayer purposes
*/
#include "../mwmp/Main.hpp"
#include "../mwmp/LocalPlayer.hpp"
#include "../mwmp/GUIController.hpp"
/*
End of tes3mp addition
@ -64,6 +65,20 @@ namespace MWVR
if (MyGUI::InputManager::getInstance().isModalAny())
return;
/*
Start of tes3mp addition
If a player's console is disabled by the server, send them a message about it and go no further
*/
if (!mwmp::Main::get().getLocalPlayer()->consoleAllowed)
{
MWBase::Environment::get().getWindowManager()->messageBox("You do not have permission to use that.");
return;
}
/*
End of tes3mp addition
*/
MWBase::Environment::get().getWindowManager()->toggleConsole();
}