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:
parent
4457c1e47a
commit
97a34c63ed
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue