mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 12:50:44 +00:00
Use R_PointToDist2 instead
Apparently overflows less often
This commit is contained in:
parent
d6c497065e
commit
104208fc84
2 changed files with 3 additions and 3 deletions
|
@ -238,8 +238,8 @@ static int lib_pAproxDistance(lua_State *L)
|
||||||
fixed_t dx = luaL_checkfixed(L, 1);
|
fixed_t dx = luaL_checkfixed(L, 1);
|
||||||
fixed_t dy = luaL_checkfixed(L, 2);
|
fixed_t dy = luaL_checkfixed(L, 2);
|
||||||
//HUDSAFE
|
//HUDSAFE
|
||||||
LUA_Deprecated(L, "P_AproxDistance", "FixedHypot");
|
LUA_Deprecated(L, "P_AproxDistance", "R_PointToDist2");
|
||||||
lua_pushfixed(L, FixedHypot(dx, dy));
|
lua_pushfixed(L, R_PointToDist2(0, 0, dx, dy));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2,
|
||||||
INT32 pflags, traverser_t ptrav);
|
INT32 pflags, traverser_t ptrav);
|
||||||
|
|
||||||
#define P_AproxDistance(dx, dy) FixedHypot(dx, dy)
|
#define P_AproxDistance(dx, dy) R_PointToDist2(0, 0, dx, dy)
|
||||||
void P_ClosestPointOnLine(fixed_t x, fixed_t y, line_t *line, vertex_t *result);
|
void P_ClosestPointOnLine(fixed_t x, fixed_t y, line_t *line, vertex_t *result);
|
||||||
void P_ClosestPointOnLine3D(fixed_t x, fixed_t y, fixed_t z, line_t *line, vertex_t *result);
|
void P_ClosestPointOnLine3D(fixed_t x, fixed_t y, fixed_t z, line_t *line, vertex_t *result);
|
||||||
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, line_t *line);
|
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, line_t *line);
|
||||||
|
|
Loading…
Reference in a new issue