Don't load world twice when clicking spectate button quick

This commit is contained in:
Benau 2019-02-10 11:06:12 +08:00
parent f42fdc7cb8
commit 061d4becc5

View File

@ -213,6 +213,12 @@ bool ClientLobby::notifyEventAsynchronous(Event* event)
//-----------------------------------------------------------------------------
void ClientLobby::addAllPlayers(Event* event)
{
if (World::getWorld())
{
Log::warn("ClientLobby", "World already loaded.");
return;
}
// In case the user opened a user info dialog
GUIEngine::ModalDialog::dismiss();
GUIEngine::ScreenKeyboard::dismiss();