diff --git a/src/actor.h b/src/actor.h index 9f9f5efb8..4380564fb 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 bd19a228f..36e9aeb3f 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; } }