ensure all extents are updated when calculating combined extents

This commit is contained in:
T1ti
2024-09-01 03:50:58 +02:00
parent 2e0e840a91
commit f192343144
2 changed files with 12 additions and 1 deletions

View File

@@ -1781,6 +1781,18 @@ void MapTile::recalcCombinedExtents()
if (!_combined_extents_dirty)
return;
// ensure all extents are updated
{
recalcExtents();
if (Water.needsUpdate())
{
Water.recalcExtents();
}
recalcObjectInstanceExtents();
}
_combined_extents = _extents;
auto& water_extents = Water.getExtents();

View File

@@ -107,7 +107,6 @@ void WorldRender::draw (glm::mat4x4 const& model_view
unsigned tile_counter = 0;
for (MapTile* tile : _world->mapIndex.loaded_tiles())
{
tile->recalcObjectInstanceExtents();
tile->recalcCombinedExtents();
if (minimap_render)