Initialize graphics when re-loading sky (#1827)

Need this so that C4Sky::Init can read the shaders.
directional-lights
Armin Burgmeier 2016-10-16 09:58:32 -07:00
parent 9aaec9a009
commit 8f61918219
1 changed files with 6 additions and 0 deletions

View File

@ -2193,6 +2193,12 @@ bool C4Game::InitGame(C4Group &hGroup, InitMode init_mode, bool fLoadSky, C4Valu
assert(!ScriptGuiRoot);
ScriptGuiRoot.reset(new C4ScriptGuiWindow);
}
else if (fLoadSky)
{
// Sky needs graphics loaded, for shaders
if (!GraphicsResource.Init())
{ LogFatal(LoadResStr("IDS_PRC_FAIL")); return false; }
}
// Load section sounds
Application.SoundSystem.LoadEffects(hGroup, NULL, true);