From 86a9168e86ceeaad711eb57880f9f518f684835c Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Mon, 18 Feb 2019 22:19:28 +0100 Subject: [PATCH] Fix dedicated server extra lua variables not being synched for joiners --- src/lua_script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua_script.c b/src/lua_script.c index 1f87d33e..28f02ca3 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -1020,7 +1020,7 @@ void LUA_Archive(void) for (i = 0; i < MAXPLAYERS; i++) { - if (!playeringame[i]) + if (!playeringame[i] && i > 0) // NEVER skip player 0, this is for dedi servs. continue; // all players in game will be archived, even if they just add a 0. ArchiveExtVars(&players[i], "player"); @@ -1056,7 +1056,7 @@ void LUA_UnArchive(void) for (i = 0; i < MAXPLAYERS; i++) { - if (!playeringame[i]) + if (!playeringame[i] && i > 0) // same here, this is to synch dediservs properly. continue; UnArchiveExtVars(&players[i]); }