From dc37c9bdb8a5f27b1a29013cc6d899221ebe3fb9 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:07:22 +1000 Subject: [PATCH] Check if object matspace is a biome metamaterial when removing old matspaces #95 --- source/game/StarWorldServer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/game/StarWorldServer.cpp b/source/game/StarWorldServer.cpp index 0e34930..a78025c 100644 --- a/source/game/StarWorldServer.cpp +++ b/source/game/StarWorldServer.cpp @@ -1534,7 +1534,7 @@ void WorldServer::updateTileEntityTiles(TileEntityPtr const& entity, bool removi tile->rootSource = {}; bool updatedTile = false; bool updatedCollision = false; - if (tile->foreground == materialSpace.material) { + if (isBiomeMaterial(materialSpace.material) || tile->foreground == materialSpace.material) { // if the world is old, the materialSpace's collision may still be in the tile tile->foreground = EmptyMaterialId; tile->foregroundMod = NoModId; @@ -1555,7 +1555,6 @@ void WorldServer::updateTileEntityTiles(TileEntityPtr const& entity, bool removi if (removing) { m_tileEntitySpaces.remove(entity->entityId()); - } else { // add new material spaces and update the known material spaces entry List passedSpaces;