Skip to content

Commit

Permalink
fix weather file caching
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes committed Jun 26, 2024
1 parent 2b4f44d commit e75085a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions code/rd-vanilla/tr_WorldEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ class COutside

if (f)
{
mWeatherZones[ zone ].WriteToDisk( f );
wz.WriteToDisk( f );
}
}
}
Expand All @@ -817,21 +817,21 @@ class COutside
////////////////////////////////////////////////////////////////////////////////////
inline bool PointOutside(const CVec3& pos)
{
if (!mCacheInit)
{
return ContentsOutside(ri.CM_PointContents(pos.v, 0));
}
for (int zone=0; zone<mWeatherZones.size(); zone++)
{
SWeatherZone wz = mWeatherZones[zone];
if (wz.mExtents.In(pos))
{
int bit, x, y, z;
wz.ConvertToCell(pos, x, y, z, bit);
return wz.CellOutside(x, y, z, bit);
}
}
return !(SWeatherZone::mMarkedOutside);
// if (!mCacheInit)
// {
// return ContentsOutside(ri.CM_PointContents(pos.v, 0));
// }
// for (int zone=0; zone<mWeatherZones.size(); zone++)
// {
// SWeatherZone wz = mWeatherZones[zone];
// if (wz.mExtents.In(pos))
// {
// int bit, x, y, z;
// wz.ConvertToCell(pos, x, y, z, bit);
// return wz.CellOutside(x, y, z, bit);
// }
// }
return ContentsOutside(ri.CM_PointContents(pos.v, 0));

}

Expand Down

0 comments on commit e75085a

Please sign in to comment.