mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Expose K_GetForwardMove to Lua
This commit is contained in:
parent
bcec17bb46
commit
5c385a3a69
1 changed files with 11 additions and 0 deletions
|
|
@ -4550,6 +4550,16 @@ static int lib_kKartKickstart(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kGetForwardMove(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
INLEVEL
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
lua_pushinteger(L, player->mo ? K_GetForwardMove(player) : 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kGetItemPatch(lua_State *L)
|
||||
{
|
||||
UINT8 item = (UINT8)luaL_optinteger(L, 1, KITEM_NONE);
|
||||
|
|
@ -5052,6 +5062,7 @@ static luaL_Reg lib[] = {
|
|||
{"K_PlayerShrinkCheat",lib_kPlayerShrinkCheat},
|
||||
{"K_UpdateShrinkCheat",lib_kUpdateShrinkCheat},
|
||||
{"K_KartKickstart",lib_kKartKickstart},
|
||||
{"K_GetForwardMove",lib_kGetForwardMove},
|
||||
{"K_GetItemPatch",lib_kGetItemPatch},
|
||||
{"K_GetInvincibilityItemFrame",lib_kGetInvincibilityItemFrame},
|
||||
{"K_GetOrbinautItemFrame",lib_kGetOrbinautItemFrame},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue