From 393b2177a9f20a4ae44a10598dcac1cdf4d72ed6 Mon Sep 17 00:00:00 2001 From: Randy Heit <rheit@zdoom.fake> Date: Sun, 13 May 2012 00:27:51 +0000 Subject: [PATCH] - Fixed: When P_ZMovement() handled MF_FLOAT, it reset the actor's z velocity to 0. I'd like to know why that was in there, but I have no idea. It was like this for the entire life of the repository, so I can't find anything from that. And since MF_FLOAT is typically also applied to monsters with MF_NOGRAVITY, the z velocity should already be 0, so it's a change that makes little sense. SVN r3645 (trunk) --- src/p_enemy.cpp | 2 +- src/p_mobj.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 45cc9fec7..eb492118c 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -431,7 +431,7 @@ bool P_Move (AActor *actor) // [RH] Walking actors that are not on the ground cannot walk. We don't // want to yank them to the ground here as Doom did, since that makes - // it difficult ot thrust them vertically in a reasonable manner. + // it difficult to thrust them vertically in a reasonable manner. // [GZ] Let jumping actors jump. if (!((actor->flags & MF_NOGRAVITY) || (actor->flags6 & MF6_CANJUMP)) && actor->z > actor->floorz && !(actor->flags2 & MF2_ONMOBJ)) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 737620034..8ba0a9441 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -2162,9 +2162,9 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz) dist = P_AproxDistance (mo->x - mo->target->x, mo->y - mo->target->y); delta = (mo->target->z + (mo->height>>1)) - mo->z; if (delta < 0 && dist < -(delta*3)) - mo->z -= mo->FloatSpeed, mo->velz = 0; + mo->z -= mo->FloatSpeed; else if (delta > 0 && dist < (delta*3)) - mo->z += mo->FloatSpeed, mo->velz = 0; + mo->z += mo->FloatSpeed; } } if (mo->player && (mo->flags & MF_NOGRAVITY) && (mo->z > mo->floorz))