[Maps] Wait for database thread before loading glass data

This commit is contained in:
momo5502 2017-03-19 11:32:03 +01:00
parent 3ca58dd4ce
commit c167f1754e

View File

@ -156,6 +156,9 @@ namespace Components
Game::G_GlassData* Maps::GetWorldData()
{
Logger::Print("Waiting for database...\n");
while (!Game::Sys_IsDatabaseReady()) std::this_thread::sleep_for(100ms);
if (!Utils::String::StartsWith(Maps::CurrentMainZone, "mp_") || Maps::IsSPMap)
{
return Game::DB_XAssetPool[Game::XAssetType::ASSET_TYPE_GAMEWORLD_SP].gameWorldSp[0].data;