1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fix map grid visibility on game load

This commit is contained in:
Ivan Savenko
2023-07-07 01:27:57 +03:00
parent 41755c9d87
commit a9d25b0109
2 changed files with 10 additions and 1 deletions

View File

@ -185,9 +185,16 @@ void MapViewController::tick(uint32_t timeDelta)
fadingInContext->progress = std::min( 1.0, fadingInContext->progress);
}
if (adventureContext)
adventureContext->animationTime += timeDelta;
updateState();
}
void MapViewController::updateState()
{
if(adventureContext)
{
adventureContext->animationTime += timeDelta;
adventureContext->settingsSessionSpectate = settings["session"]["spectate"].Bool();
adventureContext->settingsAdventureObjectAnimation = settings["adventure"]["objectAnimation"].Bool();
adventureContext->settingsAdventureTerrainAnimation = settings["adventure"]["terrainAnimation"].Bool();
@ -511,6 +518,7 @@ void MapViewController::activateAdventureContext(uint32_t animationTime)
adventureContext = std::make_shared<MapRendererAdventureContext>(*state);
adventureContext->animationTime = animationTime;
context = adventureContext;
updateState();
}
void MapViewController::activateAdventureContext()