From f9aae72dc44e8170b1513ef09c6d550b7944918f Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 20 Mar 2012 03:05:33 +0000 Subject: [PATCH] - Fixed: P_CheckFor3DFloorHit() needs to use the actor's floorz instead of its z, and P_CheckFor3DCeilingHit() needs to use the actor's ceilingz instead of its z. These functions are called from P_ZMovement() when a collision with the floor or ceiling has been detected but before the z has been clamped. e.g. A hard fall will leave the actor's z beneath the floor even though it will be set to the floor after P_CheckFor3DFloorHit() returns. SVN r3460 (trunk) --- src/p_3dfloors.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 04687ac12f..31681171f2 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -361,7 +361,7 @@ bool P_CheckFor3DFloorHit(AActor * mo) if(rover->flags & FF_SOLID && rover->model->SecActTarget) { - if(mo->z == rover->top.plane->ZatPoint(mo->x, mo->y)) + if(mo->floorz == rover->top.plane->ZatPoint(mo->x, mo->y)) { rover->model->SecActTarget->TriggerAction (mo, SECSPAC_HitFloor); return true; @@ -391,7 +391,7 @@ bool P_CheckFor3DCeilingHit(AActor * mo) if(rover->flags & FF_SOLID && rover->model->SecActTarget) { - if(mo->z+mo->height == rover->bottom.plane->ZatPoint(mo->x, mo->y)) + if(mo->ceilingz == rover->bottom.plane->ZatPoint(mo->x, mo->y)) { rover->model->SecActTarget->TriggerAction (mo, SECSPAC_HitCeiling); return true;