Skip to content

Commit

Permalink
fix weather zone not being created if missing when reading from weath…
Browse files Browse the repository at this point in the history
…er cache file
  • Loading branch information
TwelveEyes committed Jun 27, 2024
1 parent 2b4f44d commit 2819a35
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions code/rd-vanilla/tr_WorldEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,14 @@ class COutside
return;
}

// Record The Extents Of The World Incase No Other Weather Zones Exist
//---------------------------------------------------------------------
if (!mWeatherZones.size())
{
Com_Printf("WARNING: No Weather Zones Encountered\n");
AddWeatherZone(tr.world->bmodels[0].bounds[0], tr.world->bmodels[0].bounds[1]);
}

// all this piece of code does really is fill in the bool "SWeatherZone::mMarkedOutside", plus the mPointCache[] for each zone,
// so we can diskload those. Maybe.
fileHandle_t f = ReadCachedWeatherFile();
Expand All @@ -720,15 +728,6 @@ class COutside
uint32_t contents;
uint32_t bit;


// Record The Extents Of The World Incase No Other Weather Zones Exist
//---------------------------------------------------------------------
if (!mWeatherZones.size())
{
Com_Printf("WARNING: No Weather Zones Encountered\n");
AddWeatherZone(tr.world->bmodels[0].bounds[0], tr.world->bmodels[0].bounds[1]);
}

f = WriteCachedWeatherFile();

// Iterate Over All Weather Zones
Expand Down

0 comments on commit 2819a35

Please sign in to comment.