mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-23 03:47:34 -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)];
|
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;
|
||||||
@ -572,8 +573,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…
x
Reference in New Issue
Block a user