1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-21 17:23:06 +00:00

Prevent door markers from being rendered when they shouldn't be

This commit is contained in:
Evil Eye 2025-09-08 21:49:12 +02:00
parent 4457c1e47a
commit 97a34c63ed

View file

@ -622,6 +622,7 @@ namespace MWGui
MWBase::World* world = MWBase::Environment::get().getWorld();
MWWorld::WorldModel* worldModel = MWBase::Environment::get().getWorldModel();
const bool recycledMarkers = !mInteriorDoorMarkerWidgets.empty();
mDoorMarkersToRecycle.insert(
mDoorMarkersToRecycle.end(), mInteriorDoorMarkerWidgets.begin(), mInteriorDoorMarkerWidgets.end());
mInteriorDoorMarkerWidgets.clear();
@ -638,12 +639,12 @@ namespace MWGui
{
for (MapEntry& entry : mMaps)
{
if (!entry.mMapTexture && !widgetCropped(entry.mMapWidget, mLocalMap))
if (!entry.mMapTexture && entry.mMapWidget->getVisible() && !widgetCropped(entry.mMapWidget, mLocalMap))
world->getDoorMarkers(worldModel->getExterior(ESM::ExteriorCellLocation(
entry.mCellX, entry.mCellY, ESM::Cell::sDefaultWorldspaceId)),
doors);
}
if (doors.empty())
if (doors.empty() && !recycledMarkers)
return;
}