From a0c7c08bb7e8a0cc6d0eb9950e0734a3d5688961 Mon Sep 17 00:00:00 2001 From: SMS Alfredo <65426124+SMS-Alfredo@users.noreply.github.com> Date: Sat, 3 Jun 2023 00:40:12 -0500 Subject: [PATCH] Expose camera->reset to Lua --- src/lua_hudlib.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 1a0599757..f38333ae7 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -167,6 +167,7 @@ enum cameraf { camera_x, camera_y, camera_z, + camera_reset, camera_angle, camera_subsector, camera_floorz, @@ -185,6 +186,7 @@ static const char *const camera_opt[] = { "x", "y", "z", + "reset", "angle", "subsector", "floorz", @@ -338,6 +340,9 @@ static int camera_get(lua_State *L) case camera_z: lua_pushinteger(L, cam->z); break; + case camera_reset: + lua_pushboolean(L, cam->reset); + break; case camera_angle: lua_pushinteger(L, cam->angle); break; @@ -384,6 +389,9 @@ static int camera_set(lua_State *L) case camera_x: case camera_y: return luaL_error(L, LUA_QL("camera_t") " field " LUA_QS " should not be set directly. Use " LUA_QL("P_TryCameraMove") " or " LUA_QL("P_TeleportCameraMove") " instead.", camera_opt[field]); + case camera_reset: + cam->reset = luaL_checkboolean(L, 3); + break; case camera_chase: { INT32 chase = luaL_checkboolean(L, 3); if (cam == &camera)