Commit bac6088b authored by Razer's avatar Razer
Browse files

Fixed initplayer server initialization

parent d52a94fd
......@@ -91,9 +91,6 @@
BASE_var_functions_server = [];
BASE_var_functions_client = [];
_initServerFunctions = [];
_initPlayerServerFunctions = [];
_functionCfg = configFile >> "CfgFunctions";
_tagList apply {
......@@ -111,7 +108,7 @@
_fnc = _tag + "_fnc_" + configName _x;
if((_isGlobal || _isClient) && !(_fnc in BASE_var_functions_client)) then {
BASE_var_functions_client pushBack _fnc;
BASE_var_functions_client pushBack toLower(_fnc);
publicVariable _fnc;
};
......@@ -124,12 +121,12 @@
_client = (getNumber (_x >> "isclient")) > 0;
_global = (getNumber (_x >> "isglobal")) > 0;
if((_client || _global) && !(_fnc in BASE_var_functions_client)) then {
BASE_var_functions_client pushBack _fnc;
BASE_var_functions_client pushBack toLower(_fnc);
publicVariable _fnc;
};
};
BASE_var_functions_server pushBack _fnc;
BASE_var_functions_server pushBack toLower(_fnc);
};
};
};
......
......@@ -39,12 +39,15 @@ _indexPlugin = 0; // Just in case _index is ever being used in DB_fnc_initServer
_ipsf = []; // Init Player Server Functions
_restoreSuccess = true;
_initServers = BASE_var_functions_server select {_x find "_fnc_initserver" != -1};
_initPlayerServers = BASE_var_functions_server select {_x find "_fnc_initplayerserver" != -1};
_pluginList apply {
_x params [["_pluginName",""],["_tag",""]];
_startIndex = BASE_var_functions_server findIf {_x == _tag + "_fnc_initserver"};
_startIndex = _initServers find ((toLower _tag) + "_fnc_initserver");
if(_startIndex != -1) then {
_function = BASE_var_functions_server select _startIndex;
_function = _initServers select _startIndex;
diag_log ("<" + _pluginName + ">: INFO: Init Server");
......@@ -55,16 +58,16 @@ _pluginList apply {
_t = [_indexPlugin,_password] spawn (missionNamespace getVariable [_function,{DIAG_LOG FORMAT ["<PluginManager>: ERROR: FAILED TO FIND FUNCTION: %1",_function]}]);
if (_function in _checkList) then {
// Add thread to wait list to check when server can be unlocked. >> useLockCheck = 1
_threadsPlugins pushBack _t;
_threadsPlugins pushBackUnique _t;
};
};
_indexPlugin = _indexPlugin + 1;
} else {
_startIndexServer = BASE_var_functions_server findIf {_x == _tag + "_fnc_initplayerserver"};
if(_startIndexServer != -1) then {
_ipsf pushBack (BASE_var_functions_server select _startIndexServer);
};
};
_startIndexServer = _initPlayerServers find ((toLower _tag) + "_fnc_initplayerserver");
if(_startIndexServer != -1) then {
_ipsf pushBackUnique (_initPlayerServers select _startIndexServer);
};
if !(_restoreSuccess) exitWith {};
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment