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 75a04776b0
commit 2ba2f2830a

View File

@ -621,6 +621,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();
@ -637,12 +638,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;
}