antistasi
antistasi copied to clipboard
Missions not loaded correctly in dedicated MP
Version: develop https://github.com/LordGolias/antistasi/commit/8c0ea9bdacffc86ebd00146e22bf80d16e31a147 Mod: CBA, TFAR Multiplayer dedicated server
I took all the missions, saved, loaded no mission appeared (in SP i get the mission at the stage they were) after that i tried to ask petros for mission and i had only 2 options to "unknown location"
rested 8 hour, still the same
I've been working on my own AS edition based on this dev branch and I've found the same problem. I think yours is the same - missions don't get loaded because clients don't have any location data.
It seems that when loading a persistent save, location, player data and probably mission data won't be loaded for players. Server loads them fine. I've checked it during game via console: locations are saved properly on server, but not on clients. This doesn't happen when starting a new game, where locations get properly saved in both server and clients.
However, persistents load properly on both server and clients when loading a game. Looking at the code, they're synced between server and clients via direct command "setvariable" with the publish flag as true. Location and player data are synced via DICT_fnc_setGlobal (which uses setVariable as well of course) when loading game and deserializing location data (eg. look at location/fnc_fromDict.sqf).
Thus, I suspect the arguments sent to DICT_fnc_setGlobal get messed up somewhere so there is something else where it's supposed to read true for publishing variables.
Right after my post I think I figured it out. The arguments for function dict_fnc_setglobal were apparentely local only for server. I think _dict call DICT_fnc_copy got a key, or keys that _fnc_setglobal needed, which were local only for the server. Changing it to fnc_copyGlobal made it public to clients and they were able to run dict_fnc_setglobal properly. Tested it andseems like it worked!
from file locations\fromDict.sqf
[AS_container, "location", _dict call DICT_fnc_copy] call DICT_fnc_setGlobal; to this -> [AS_container, "location", _dict call DICT_fnc_copyGlobal] call DICT_fnc_setGlobal;
same for missions and players