fix RPATH and object material spaces from old worlds getting stuck

This commit is contained in:
Kae 2024-03-17 15:11:29 +11:00
parent 252ce113a5
commit 8559a46df2
2 changed files with 4 additions and 2 deletions

View File

@ -275,7 +275,7 @@ if(STAR_COMPILER_GNU)
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -Ofast")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Ofast")
set(BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
elseif(STAR_COMPILER_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wuninitialized -Wno-parentheses-equality -Wno-deprecated-declarations")
@ -306,7 +306,7 @@ elseif(STAR_COMPILER_CLANG)
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -Ofast")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Ofast")
set(BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
elseif(STAR_COMPILER_MSVC)
# /MP - Multi-processor building

View File

@ -1510,6 +1510,8 @@ void WorldServer::updateTileEntityTiles(TileEntityPtr const& entity, bool removi
if (tile->foreground == materialSpace.material) {
tile->foreground = EmptyMaterialId;
tile->foregroundMod = NoModId;
if (!isRealMaterial(tile->foreground)) // if the world is old the materialSpace's collision may still be in the tile
tile->updateCollision(CollisionKind::None);
updatedTile = true;
}
if (tile->updateObjectCollision(CollisionKind::None)) {