From 35755eb1f1bce313255ae504df1e66f0fee54b85 Mon Sep 17 00:00:00 2001 From: terrabyte25 <23338617+terabyte25@users.noreply.github.com> Date: Sat, 1 Dec 2018 10:51:33 -0600 Subject: [PATCH] [Client] Disallow opening inventory menu when not logged in --- apps/openmw/mwinput/inputmanagerimp.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 9aaf34908..88538368f 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -1133,10 +1133,21 @@ namespace MWInput { if (!mControlSwitch["playercontrols"]) return; - + if (MyGUI::InputManager::getInstance ().isModalAny()) return; - + + /* + Start of tes3mp addition + + Ignore attempts to open inventory if the player has not logged in on the server yet + */ + if (!mwmp::Main::get().getLocalPlayer()->isLoggedIn()) + return; + /* + End of tes3mp addition + */ + // Toggle between game mode and inventory mode if(!MWBase::Environment::get().getWindowManager()->isGuiMode()) MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Inventory);