mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-22 16:02:29 +00:00
Lua: Allow angle to be set and fix userdata type for K_FindJawzTarget
This commit is contained in:
parent
ab2bc061d6
commit
f2ee8783dd
1 changed files with 3 additions and 2 deletions
|
|
@ -4175,12 +4175,13 @@ static int lib_kFindJawzTarget(lua_State *L)
|
||||||
{
|
{
|
||||||
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
player_t *source = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
player_t *source = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
||||||
//HUDSAFE
|
angle_t angle = luaL_checkangle(L, 3);
|
||||||
|
INLEVEL
|
||||||
if (!actor)
|
if (!actor)
|
||||||
return LUA_ErrInvalid(L, "mobj_t");
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
if (!source)
|
if (!source)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
LUA_PushUserdata(L, K_FindJawzTarget(actor, source, ANGLE_45), META_PLAYER);
|
LUA_PushUserdata(L, K_FindJawzTarget(actor, source, angle), META_MOBJ);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue