Revert using quick dist functions in lua hud, since some lua scripts need it to be precise (lua driftgauge for example)

This commit is contained in:
indev committed 2025-08-26 20:17:40 +03:00
1 parent 6f93299aaf
commit 18bdbfdb07
1 file changed
+2 -8
+2 -8
View File
@@ -1675,10 +1675,7 @@ FUNCINLINE static ATTRINLINE int lib_rPointToDist(lua_State *L)
fixed_t x = luaL_checkfixed(L, 1);
fixed_t y = luaL_checkfixed(L, 2);
//HUDSAFE
if (hud_running)
lua_pushfixed(L, R_QuickCamDist(x, y) << FRACBITS);
else
lua_pushfixed(L, R_PointToDist(x, y));
lua_pushfixed(L, R_PointToDist(x, y));
return 1;
}
@@ -1689,10 +1686,7 @@ FUNCINLINE static ATTRINLINE int lib_rPointToDist2(lua_State *L)
fixed_t px1 = luaL_checkfixed(L, 3);
fixed_t py1 = luaL_checkfixed(L, 4);
//HUDSAFE
if (hud_running)
lua_pushfixed(L, R_QuickDist(px2, py2, px1, py1) << FRACBITS);
else
lua_pushfixed(L, R_PointToDist2(px2, py2, px1, py1));
lua_pushfixed(L, R_PointToDist2(px2, py2, px1, py1));
return 1;
}