mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-21 14:23:09 +00:00
Only count rendered neighbours
This commit is contained in:
parent
97a34c63ed
commit
6eb005ff3e
1 changed files with 6 additions and 2 deletions
|
|
@ -192,7 +192,8 @@ namespace MWRender
|
||||||
|
|
||||||
MapSegment& segment = mExteriorSegments[std::make_pair(cellX, cellY)];
|
MapSegment& segment = mExteriorSegments[std::make_pair(cellX, cellY)];
|
||||||
const std::uint8_t neighbourFlags = getExteriorNeighbourFlags(cellX, cellY);
|
const std::uint8_t neighbourFlags = getExteriorNeighbourFlags(cellX, cellY);
|
||||||
if ((segment.mLastRenderNeighbourFlags & neighbourFlags) == neighbourFlags)
|
if (segment.mLastRenderNeighbourFlags != 0
|
||||||
|
&& (segment.mLastRenderNeighbourFlags & neighbourFlags) == neighbourFlags)
|
||||||
return;
|
return;
|
||||||
requestExteriorMap(cell, segment);
|
requestExteriorMap(cell, segment);
|
||||||
segment.mLastRenderNeighbourFlags = neighbourFlags;
|
segment.mLastRenderNeighbourFlags = neighbourFlags;
|
||||||
|
|
@ -573,8 +574,11 @@ namespace MWRender
|
||||||
};
|
};
|
||||||
std::uint8_t result = 0;
|
std::uint8_t result = 0;
|
||||||
for (const auto& [flag, dx, dy] : flags)
|
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;
|
result |= flag;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue