From ef81e713e291f96fa91de9b9c70398cde9e82e28 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 28 Apr 2023 19:30:14 +1000 Subject: [PATCH] - Exhumed: Clamp off vale in fix from adbd5c3c69de7784814d95a3f8daef250ca5a30f. * Fixes example situations where the player is underwater and smashing against the ceiling, etc. --- source/games/exhumed/src/move.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index fc039a6f9..7ed6babab 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -367,8 +367,8 @@ Collision movespritez(DExhumedActor* pActor, double z, double height, double cli else if ((destZ - height) < sprceiling && (hiHit.type == kHitSprite || pActor->sector()->pAbove == nullptr)) { destZ = sprceiling + height; - pActor->spr.pos.Z = pActor->opos.Z = destZ; - pActor->spr.pos.Z += z; + pActor->opos.Z = destZ; + pActor->spr.pos.Z = max(destZ + z, destZ); nRet.exbits |= kHitAux1; } else