Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-17 15:11:29 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-17 15:11:29 +1100
commit8559a46df2ad026571ba7c132d9ce4d2c3392f56 (patch)
tree57bff14ae96afa1867f87f706bf5ea84f64eb38c
parent252ce113a580c544fc359af1cb26b95a92d484aa (diff)
fix RPATH and object material spaces from old worlds getting stuck
-rw-r--r--source/CMakeLists.txt4
-rw-r--r--source/game/StarWorldServer.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 25490ec..7e54f1c 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -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
diff --git a/source/game/StarWorldServer.cpp b/source/game/StarWorldServer.cpp
index d878a4c..a718ae8 100644
--- a/source/game/StarWorldServer.cpp
+++ b/source/game/StarWorldServer.cpp
@@ -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)) {