From 2e35d6a6a8bea65c6f98a59f7a476966eba35380 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2023 10:45:15 +0100 Subject: [PATCH] - Exhumed: account for rounding errors in MoveSectorSprites The formula here left no margin for error and minor rounding errors are inevitable with this code. --- source/games/exhumed/src/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index 50c339f1f..b36a5eb15 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -662,7 +662,7 @@ void MoveSectorSprites(sectortype* pSector, double z) while (auto pActor = it.Next()) { double actz = pActor->spr.pos.Z; - if ((pActor->spr.statnum != 200 && actz >= minz && actz <= maxz) || pActor->spr.statnum >= 900) + if ((pActor->spr.statnum != 200 && actz > minz - zmaptoworld && actz < maxz + zmaptoworld) || pActor->spr.statnum >= 900) { pActor->spr.pos.Z = newz; }