From 7d183009236eb99f0dc8c75818195bbfbb8cd076 Mon Sep 17 00:00:00 2001 From: Guil Date: Thu, 6 Nov 2025 22:07:45 +0000 Subject: [PATCH] Expose localplayers to lua --- src/lua_playerlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index c5baf3c93..5e24f9aba 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -177,7 +177,7 @@ static int lib_iterateLocalplayers(lua_State *L) return 1; } - if (i <= r_splitscreen) + if (i <= splitscreen) { if (!playeringame[g_localplayers[i]] || (i > 0 && g_localplayers[i] == g_localplayers[0])) return 0; @@ -206,7 +206,7 @@ static int lib_getLocalplayers(lua_State *L) lua_Integer i = luaL_checkinteger(L, 2); if (i < 0 || i >= MAXSPLITSCREENPLAYERS) return luaL_error(L, "localplayers[] index %d out of range (0 - %d)", i, MAXSPLITSCREENPLAYERS-1); - if (i > r_splitscreen) + if (i > splitscreen) return 0; if (i > 0 && g_localplayers[i] == g_localplayers[0]) return 0;