From a122ba0ef4af865d225adbe22a55b8001af04c61 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 6 Jan 2019 10:24:44 +0100 Subject: Fix various bugs (Anticheat, Lua helpers) (#8013) * Fix various bugs (Anticheat, Lua helpers) Anticheat: Use camera position instead of player position for shoot line calculations Lua helpers: Increase 'i' to not overwrite earlier added table values * Remove lag compensation * * 1.5 for larger selection boxes --- src/script/lua_api/l_mainmenu.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/script/lua_api/l_mainmenu.cpp') diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index f0f56098f..145ff0970 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -532,8 +532,7 @@ int ModApiMainMenu::l_get_content_info(lua_State *L) int i = 1; for (const auto &dep : spec.depends) { lua_pushstring(L, dep.c_str()); - lua_rawseti(L, -2, i); - i++; + lua_rawseti(L, -2, i++); } lua_setfield(L, -2, "depends"); @@ -542,8 +541,7 @@ int ModApiMainMenu::l_get_content_info(lua_State *L) i = 1; for (const auto &dep : spec.optdepends) { lua_pushstring(L, dep.c_str()); - lua_rawseti(L, -2, i); - i++; + lua_rawseti(L, -2, i++); } lua_setfield(L, -2, "optional_depends"); } -- cgit v1.2.3