Clear Relight markers in C4Landscape::Clear (#1510)

Otherwise, when starting the next scenario, random spots would be initially
re-lighted. That's not necessarily a problem, but unnecessary work, and it
triggered the assertion in C4FowAmbient::UpdateFromLandscape if the relight
was scheduled for a region that's outside of the landscape boundaries of the
second scenario.
shapetextures
Armin Burgmeier 2015-12-21 19:32:36 -08:00
parent 32bc68fdab
commit eab0f2850a
1 changed files with 3 additions and 0 deletions

View File

@ -1276,6 +1276,9 @@ void C4Landscape::Clear(bool fClearMapCreator, bool fClearSky, bool fClearRender
delete [] pInitial; pInitial = NULL;
delete [] pInitialBkg; pInitialBkg = NULL;
delete pFoW; pFoW = NULL;
// clear relight array
for (int32_t i = 0; i < C4LS_MaxRelights; ++i)
Relights[i].Default();
// clear scan
ScanX=0;
Mode=C4LSC_Undefined;