mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-30 04:20:56 +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:
parent
ab60c1afcc
commit
f9aae72dc4
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue