mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-17 02:01:35 +00:00
Add P_PointOnLineSide to Lua
This commit is contained in:
parent
b51a1148d1
commit
c239a71ffe
1 changed files with 11 additions and 0 deletions
|
@ -205,6 +205,16 @@ static int lib_pClosestPointOnLine(lua_State *L)
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_pPointOnLineSide(lua_State *L)
|
||||||
|
{
|
||||||
|
fixed_t x = luaL_checkfixed(L, 1);
|
||||||
|
fixed_t y = luaL_checkfixed(L, 2);
|
||||||
|
line_t *line = *((line_t **)luaL_checkudata(L, 3, META_LINE));
|
||||||
|
//HUDSAFE
|
||||||
|
lua_pushinteger(L, P_PointOnLineSide(x, y, line));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// P_ENEMY
|
// P_ENEMY
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
|
@ -1981,6 +1991,7 @@ static luaL_Reg lib[] = {
|
||||||
// p_maputil
|
// p_maputil
|
||||||
{"P_AproxDistance",lib_pAproxDistance},
|
{"P_AproxDistance",lib_pAproxDistance},
|
||||||
{"P_ClosestPointOnLine",lib_pClosestPointOnLine},
|
{"P_ClosestPointOnLine",lib_pClosestPointOnLine},
|
||||||
|
{"P_PointOnLineSide",lib_pPointOnLineSide},
|
||||||
|
|
||||||
// p_enemy
|
// p_enemy
|
||||||
{"P_CheckMeleeRange", lib_pCheckMeleeRange},
|
{"P_CheckMeleeRange", lib_pCheckMeleeRange},
|
||||||
|
|
Loading…
Reference in a new issue