diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index 609d9c8b870a09324ff6dbea82a4f69c56e7c665..c5f847be63026831eb2fefd6b71637cfa67b3a80 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -432,8 +432,7 @@ static int lib_pAproxDistance(lua_State *L)
 	fixed_t dx = luaL_checkfixed(L, 1);
 	fixed_t dy = luaL_checkfixed(L, 2);
 	//HUDSAFE
-	LUA_Deprecated(L, "P_AproxDistance", "FixedHypot");
-	lua_pushfixed(L, FixedHypot(dx, dy));
+	lua_pushfixed(L, P_AproxDistance(dx, dy));
 	return 1;
 }
 
diff --git a/src/p_maputl.c b/src/p_maputl.c
index 83905a418361004da4f1ee728b53ff9d47ff9bb3..90718a41cbe700621c191994401925ca5ab360e3 100644
--- a/src/p_maputl.c
+++ b/src/p_maputl.c
@@ -24,6 +24,19 @@
 #include "p_slopes.h"
 #include "z_zone.h"
 
+//
+// P_AproxDistance
+// Gives an estimation of distance (not exact)
+//
+fixed_t P_AproxDistance(fixed_t dx, fixed_t dy)
+{
+	dx = abs(dx);
+	dy = abs(dy);
+	if (dx < dy)
+		return dx + dy - (dx>>1);
+	return dx + dy - (dy>>1);
+}
+
 //
 // P_ClosestPointOnLine
 // Finds the closest point on a given line to the supplied point
diff --git a/src/p_maputl.h b/src/p_maputl.h
index df90ab4b47a660f453de6f62343ffdb3fe408dfd..08b606833cd7895e11211de6eb94b4742f13125e 100644
--- a/src/p_maputl.h
+++ b/src/p_maputl.h
@@ -41,7 +41,7 @@ typedef boolean (*traverser_t)(intercept_t *in);
 boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2,
 	INT32 pflags, traverser_t ptrav);
 
-#define P_AproxDistance(dx, dy) FixedHypot(dx, dy)
+FUNCMATH fixed_t P_AproxDistance(fixed_t dx, fixed_t dy);
 void P_ClosestPointOnLine(fixed_t x, fixed_t y, line_t *line, vertex_t *result);
 void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *line, vector3_t *result);
 INT32 P_PointOnLineSide(fixed_t x, fixed_t y, line_t *line);