mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-22 16:02:29 +00:00
Expose P_ForceLocalAngle to Lua
This commit is contained in:
parent
92d4bfc6c6
commit
cffb480b9f
1 changed files with 13 additions and 0 deletions
|
|
@ -1740,6 +1740,18 @@ static int lib_pSetPlayerAngle(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_pForceLocalAngle(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
angle_t angle = luaL_checkangle(L, 2);
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
P_ForceLocalAngle(player, angle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// P_MAP
|
||||
///////////
|
||||
|
||||
|
|
@ -4450,6 +4462,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_ReturnThrustY",lib_pReturnThrustY},
|
||||
{"P_NukeEnemies",lib_pNukeEnemies},
|
||||
{"P_SetPlayerAngle",lib_pSetPlayerAngle},
|
||||
{"P_ForceLocalAngle",lib_pForceLocalAngle},
|
||||
{"K_GetEffectiveFollowerColor",lib_pGetEffectiveFollowerColor},
|
||||
|
||||
// p_map
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue