mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-13 18:22:18 +00:00
Expose K_FlingPaperItem to Lua
This commit is contained in:
parent
e313411e7b
commit
3bbdab5528
1 changed files with 16 additions and 0 deletions
|
|
@ -4318,6 +4318,21 @@ static int lib_kCreatePaperItem(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kFlingPaperItem(lua_State *L)
|
||||
{
|
||||
fixed_t x = luaL_checkfixed(L, 1);
|
||||
fixed_t y = luaL_checkfixed(L, 2);
|
||||
fixed_t z = luaL_checkfixed(L, 3);
|
||||
angle_t angle = luaL_optinteger(L, 4, 0);
|
||||
SINT8 flip = luaL_optinteger(L, 5, 0);
|
||||
UINT8 type = luaL_optinteger(L, 6, 0);
|
||||
UINT16 amount = luaL_optinteger(L, 7, 1);
|
||||
NOHUD
|
||||
INLEVEL
|
||||
LUA_PushUserdata(L, K_FlingPaperItem(x, y, z, angle, flip, type, amount), META_MOBJ);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kPopPlayerShield(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
|
|
@ -5552,6 +5567,7 @@ static luaL_Reg lib[] = {
|
|||
{"K_KartUpdatePosition",lib_kKartUpdatePosition},
|
||||
{"K_DropPaperItem",lib_kDropPaperItem},
|
||||
{"K_CreatePaperItem",lib_kCreatePaperItem},
|
||||
{"K_FlingPaperItem",lib_kFlingPaperItem},
|
||||
{"K_PopPlayerShield",lib_kPopPlayerShield},
|
||||
{"K_DropHnextList",lib_kDropHnextList},
|
||||
{"K_DropItems",lib_kDropItems},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue