Expose P_SetPlayerAngle to Lua

This commit is contained in:
JugadorXEI 2025-08-08 02:02:33 +02:00
parent 7e278b7c00
commit 92d4bfc6c6

View file

@ -1728,6 +1728,18 @@ static int lib_pNukeEnemies(lua_State *L)
return 0;
}
static int lib_pSetPlayerAngle(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_SetPlayerAngle(player, angle);
return 0;
}
// P_MAP
///////////
@ -4437,6 +4449,7 @@ static luaL_Reg lib[] = {
{"P_ReturnThrustX",lib_pReturnThrustX},
{"P_ReturnThrustY",lib_pReturnThrustY},
{"P_NukeEnemies",lib_pNukeEnemies},
{"P_SetPlayerAngle",lib_pSetPlayerAngle},
{"K_GetEffectiveFollowerColor",lib_pGetEffectiveFollowerColor},
// p_map