Scenarios that pause the game in the beginning get no more black screen
This commit is contained in:
parent
25a8f44ee1
commit
5791f64829
|
@ -1340,6 +1340,11 @@ void World::createUnit(const string &unitName, int factionIndex, const Vec2i &po
|
||||||
if(scriptManager) {
|
if(scriptManager) {
|
||||||
scriptManager->onUnitCreated(unit);
|
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 {
|
else {
|
||||||
delete unit;
|
delete unit;
|
||||||
|
@ -1707,6 +1712,9 @@ void World::clearCaches() {
|
||||||
|
|
||||||
void World::togglePauseGame(bool pauseStatus,bool forceAllowPauseStateChange) {
|
void World::togglePauseGame(bool pauseStatus,bool forceAllowPauseStateChange) {
|
||||||
game->setPaused(pauseStatus, forceAllowPauseStateChange, false, false);
|
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) {
|
void World::addConsoleText(const string &text) {
|
||||||
|
|
Loading…
Reference in New Issue