mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
push R_PointToAnlePlayer to Lua, might be super useful for it.
This commit is contained in:
parent
d253b66524
commit
47a95efa6b
1 changed files with 11 additions and 0 deletions
|
|
@ -2098,6 +2098,16 @@ static int lib_rPointToAngle(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_rPointToAnglePlayer(lua_State *L)
|
||||||
|
{
|
||||||
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
|
fixed_t x = luaL_checkfixed(L, 2);
|
||||||
|
fixed_t y = luaL_checkfixed(L, 3);
|
||||||
|
//HUDSAFE
|
||||||
|
lua_pushangle(L, R_PointToAnglePlayer(player, x, y));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_rPointToAngle2(lua_State *L)
|
static int lib_rPointToAngle2(lua_State *L)
|
||||||
{
|
{
|
||||||
fixed_t px2 = luaL_checkfixed(L, 1);
|
fixed_t px2 = luaL_checkfixed(L, 1);
|
||||||
|
|
@ -3876,6 +3886,7 @@ static luaL_Reg lib[] = {
|
||||||
|
|
||||||
// r_defs
|
// r_defs
|
||||||
{"R_PointToAngle",lib_rPointToAngle},
|
{"R_PointToAngle",lib_rPointToAngle},
|
||||||
|
{"R_PointToAnglePlayer", lib_rPointToAnglePlayer},
|
||||||
{"R_PointToAngle2",lib_rPointToAngle2},
|
{"R_PointToAngle2",lib_rPointToAngle2},
|
||||||
{"R_PointToDist",lib_rPointToDist},
|
{"R_PointToDist",lib_rPointToDist},
|
||||||
{"R_PointToDist2",lib_rPointToDist2},
|
{"R_PointToDist2",lib_rPointToDist2},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue