mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-21 10:59:21 -04:00
Only count rendered neighbours
This commit is contained in:
parent
2ba2f2830a
commit
082b9a5461
@ -192,7 +192,8 @@ namespace MWRender
|
||||
|
||||
MapSegment& segment = mExteriorSegments[std::make_pair(cellX, cellY)];
|
||||
const std::uint8_t neighbourFlags = getExteriorNeighbourFlags(cellX, cellY);
|
||||
if ((segment.mLastRenderNeighbourFlags & neighbourFlags) == neighbourFlags)
|
||||
if (segment.mLastRenderNeighbourFlags != 0
|
||||
&& (segment.mLastRenderNeighbourFlags & neighbourFlags) == neighbourFlags)
|
||||
return;
|
||||
requestExteriorMap(cell, segment);
|
||||
segment.mLastRenderNeighbourFlags = neighbourFlags;
|
||||
@ -572,8 +573,11 @@ namespace MWRender
|
||||
};
|
||||
std::uint8_t result = 0;
|
||||
for (const auto& [flag, dx, dy] : flags)
|
||||
if (mExteriorSegments.contains(std::pair(cellX + dx, cellY + dy)))
|
||||
{
|
||||
auto it = mExteriorSegments.find(std::pair(cellX + dx, cellY + dy));
|
||||
if (it != mExteriorSegments.end() && it->second.mMapTexture)
|
||||
result |= flag;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user