1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 17:15:32 +00:00

[Client] Disallow opening inventory menu when not logged in

This commit is contained in:
terrabyte25 2018-12-01 10:51:33 -06:00 committed by GitHub
parent b7090b2550
commit 35755eb1f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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