0
0
Fork 0
mirror of https://github.com/ZDoom/qzdoom.git synced 2025-02-22 03:41:25 +00:00

- 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)
This commit is contained in:
Randy Heit 2012-03-20 03:05:33 +00:00
parent ab60c1afcc
commit f9aae72dc4

View file

@ -361,7 +361,7 @@ bool P_CheckFor3DFloorHit(AActor * mo)
if(rover->flags & FF_SOLID && rover->model->SecActTarget) 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); rover->model->SecActTarget->TriggerAction (mo, SECSPAC_HitFloor);
return true; return true;
@ -391,7 +391,7 @@ bool P_CheckFor3DCeilingHit(AActor * mo)
if(rover->flags & FF_SOLID && rover->model->SecActTarget) 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); rover->model->SecActTarget->TriggerAction (mo, SECSPAC_HitCeiling);
return true; return true;