From c2e291039996f49e06da2cca0725cd0d8e945395 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 30 Mar 2016 10:08:06 +0200 Subject: [PATCH] - fixed copy/paste error in P_GetFriction resulting in incorrect calculation of movefactor. --- src/actor.h | 2 +- src/p_map.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actor.h b/src/actor.h index 9f9f5efb8e..4380564fbb 100644 --- a/src/actor.h +++ b/src/actor.h @@ -1305,7 +1305,7 @@ public: { return Z() < checkz - Z_Epsilon; } - bool isAtZ(double checkz) + bool isAtZ(double checkz) const { return fabs(Z() - checkz) < Z_Epsilon; } diff --git a/src/p_map.cpp b/src/p_map.cpp index bd19a228f7..36e9aeb3f7 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -557,7 +557,7 @@ double P_GetFriction(const AActor *mo, double *frictionfactor) if (rover->flags & FF_SOLID) { // Must be standing on a solid floor - if (mo->Z() != rover->top.plane->ZatPoint(pos)) continue; + if (!mo->isAtZ(rover->top.plane->ZatPoint(pos))) continue; } else if (rover->flags & FF_SWIMMABLE) { @@ -573,7 +573,7 @@ double P_GetFriction(const AActor *mo, double *frictionfactor) if (newfriction < friction || friction == ORIG_FRICTION) { friction = newfriction; - movefactor = newmf * 0.5; + movefactor = newmf; } }