From bff3b20c4a8bdae01307a2d027150bd0f960c2fb Mon Sep 17 00:00:00 2001 From: Zachary McAlpin Date: Tue, 6 Oct 2020 16:54:23 -0500 Subject: [PATCH] Made states unmodifable in CMD building code --- src/lua_infolib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lua_infolib.c b/src/lua_infolib.c index c98aa57d1..5e5a1dbc4 100644 --- a/src/lua_infolib.c +++ b/src/lua_infolib.c @@ -919,6 +919,8 @@ static int state_set(lua_State *L) if (hud_running) return luaL_error(L, "Do not alter states in HUD rendering code!"); + if (hook_cmd_running) + return luaL_error(L, "Do not alter states in CMD building code!"); if (fastcmp(field,"sprite")) { value = luaL_checknumber(L, 3);