diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 824825fe7b29ea7c62278652624d04b0b106e27c..140aee2d66a25fdf7fc23b0068293c36e7912166 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1109,6 +1109,13 @@ static int libd_renderer(lua_State *L) return 1; } +static int libd_splitscreen(lua_State *L) +{ + HUDONLY + lua_pushinteger(L, r_splitscreen); // push splitscreen + return 1; +} + // M_RANDOM ////////////// @@ -1223,6 +1230,7 @@ static luaL_Reg lib_draw[] = { {"dupx", libd_dupx}, {"dupy", libd_dupy}, {"renderer", libd_renderer}, + {"splitscreen", libd_splitscreen}, {"localTransFlag", libd_getlocaltransflag}, {"drawOnMinimap", libd_drawOnMinimap}, {"getDeltaTime", libd_getDeltaTime}, diff --git a/src/lua_script.c b/src/lua_script.c index 1edbae3b71b3a2655dc6a3dfa5dbb00382695141..4f743efa3e6ba54d0b654b28ba3040ffc2582ae8 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -178,9 +178,6 @@ int LUA_PushGlobals(lua_State *L, const char *word) } else if (fastcmp(word,"splitscreen")) { lua_pushinteger(L, splitscreen); return 1; - } else if (fastcmp(word,"r_splitscreen")) { - lua_pushinteger(L, r_splitscreen); - return 1; } else if (fastcmp(word,"gamecomplete")) { lua_pushboolean(L, (gamecomplete != 0)); return 1;