- Exhumed: Clamp off vale in fix from adbd5c3c69.

* Fixes example situations where the player is underwater and smashing against the ceiling, etc.
This commit is contained in:
Mitchell Richters 2023-04-28 19:30:14 +10:00
parent 742d76a4bf
commit ef81e713e2

View file

@ -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