mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-23 03:47:34 -04:00
Prevent door markers from being rendered when they shouldn't be
This commit is contained in:
parent
75a04776b0
commit
2ba2f2830a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user