From ba66031b099b992580714dc5e256565288b86270 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 2 May 2022 08:42:38 +0300 Subject: [PATCH] [VR Client] Prevent use of console from meta menu --- apps/openmw/mwvr/vrmetamenu.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/openmw/mwvr/vrmetamenu.cpp b/apps/openmw/mwvr/vrmetamenu.cpp index fff1771ab..10ca255ee 100644 --- a/apps/openmw/mwvr/vrmetamenu.cpp +++ b/apps/openmw/mwvr/vrmetamenu.cpp @@ -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(); }