From 01f283925314938cb070435d51215ffef2c072cd Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:10:33 -0400 Subject: [PATCH] Push cmd.angle to lua --- src/lua_playerlib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 59ace7435..8aa440333 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -931,6 +931,8 @@ static int ticcmd_get(lua_State *L) lua_pushinteger(L, cmd->sidemove); else if (fastcmp(field,"turning")) lua_pushinteger(L, cmd->turning); + else if (fastcmp(field,"angle")) + lua_pushinteger(L, cmd->angle); else if (fastcmp(field,"throwdir")) lua_pushinteger(L, cmd->throwdir); else if (fastcmp(field,"aiming")) @@ -961,6 +963,8 @@ static int ticcmd_set(lua_State *L) cmd->forwardmove = (SINT8)luaL_checkinteger(L, 3); else if (fastcmp(field,"turning")) cmd->turning = (INT16)luaL_checkinteger(L, 3); + else if (fastcmp(field,"angle")) + cmd->angle = (INT16)luaL_checkinteger(L, 3); else if (fastcmp(field,"throwdir")) cmd->throwdir = (INT16)luaL_checkinteger(L, 3); else if (fastcmp(field,"aiming"))