From 5791f648295f76691460f5899cf672ba4bedd04c Mon Sep 17 00:00:00 2001 From: titiger Date: Wed, 19 Nov 2014 23:29:51 +0100 Subject: [PATCH] Scenarios that pause the game in the beginning get no more black screen --- source/glest_game/world/world.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index 7003a2e4..9a90a447 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -1340,6 +1340,11 @@ void World::createUnit(const string &unitName, int factionIndex, const Vec2i &po if(scriptManager) { scriptManager->onUnitCreated(unit); } + if(game->getPaused()==true){ + // new units added in pause mode might change the Fow. ( Scenarios do this ) + computeFow(); + minimap.updateFowTex(1.f); + } } else { delete unit; @@ -1707,6 +1712,9 @@ void World::clearCaches() { void World::togglePauseGame(bool pauseStatus,bool forceAllowPauseStateChange) { game->setPaused(pauseStatus, forceAllowPauseStateChange, false, false); + // ensures that the Fow is really up to date when the game switches to pause mode. ( mainly for scenarios ) + computeFow(); + minimap.updateFowTex(1.f); } void World::addConsoleText(const string &text) {