Make spectator helper message to show when server is ready

This commit is contained in:
Benau 2019-02-03 15:27:01 +08:00
parent 9757209da6
commit f048e19bb1
2 changed files with 11 additions and 13 deletions

View File

@ -280,9 +280,17 @@ void WorldStatus::updateTime(int ticks)
// fully
if (m_auxiliary_ticks == stk_config->time2Ticks(3.0f))
{
auto lobby = LobbyProtocol::get<LobbyProtocol>();
assert(lobby);
lobby->finishedLoadingWorld();
auto cl = LobbyProtocol::get<ClientLobby>();
assert(cl);
cl->finishedLoadingWorld();
#ifndef ANDROID
static bool helper_msg_shown = false;
if (!helper_msg_shown && cl->isSpectator())
{
helper_msg_shown = true;
cl->addSpectateHelperMessage();
}
#endif
}
return;
}

View File

@ -424,16 +424,6 @@ void ClientLobby::update(int ticks)
}
case SELECTING_ASSETS:
case RACING:
#ifndef ANDROID
{
static bool helper_msg_shown = false;
if (!helper_msg_shown && isSpectator())
{
helper_msg_shown = true;
addSpectateHelperMessage();
}
}
#endif
case EXITING:
break;
}