diff --git a/Missionframework/init.sqf b/Missionframework/init.sqf index 2542a0ee..901c8538 100644 --- a/Missionframework/init.sqf +++ b/Missionframework/init.sqf @@ -4,6 +4,7 @@ if (isDedicated) then {debug_source = "Server";} else {debug_source = name playe [] call compileFinal preprocessFileLineNumbers "scripts\shared\liberation_functions.sqf"; [] call compileFinal preprocessFileLineNumbers "scripts\shared\init_sectors.sqf"; +if (!isServer) then {waitUntil {!isNil "KP_serverParamsFetched"};}; [] call compileFinal preprocessFileLineNumbers "scripts\shared\fetch_params.sqf"; [] call compileFinal preprocessFileLineNumbers "kp_liberation_config.sqf"; [] call compileFinal preprocessFileLineNumbers "presets\init_presets.sqf"; @@ -14,21 +15,19 @@ if (isDedicated) then {debug_source = "Server";} else {debug_source = name playe [] call compileFinal preprocessFileLineNumbers "scripts\shared\init_shared.sqf"; if (isServer) then { - [] call compileFinal preprocessFileLineNumbers "scripts\server\init_server.sqf"; + [] call compileFinal preprocessFileLineNumbers "scripts\server\init_server.sqf"; }; if (!isDedicated && !hasInterface && isMultiplayer) then { - execVM "scripts\server\offloading\hc_manager.sqf"; + execVM "scripts\server\offloading\hc_manager.sqf"; }; if (!isDedicated && hasInterface) then { - execVM "scripts\client\markers\sector_manager.sqf"; - execVM "scripts\client\markers\fob_markers.sqf"; waitUntil {alive player}; - if (debug_source != name player) then {debug_source = name player}; - [] call compileFinal preprocessFileLineNumbers "scripts\client\init_client.sqf"; + if (debug_source != name player) then {debug_source = name player}; + [] call compileFinal preprocessFileLineNumbers "scripts\client\init_client.sqf"; } else { - setViewDistance 1600; + setViewDistance 1600; }; // Execute fnc_reviveInit again (by default it executes in postInit) diff --git a/Missionframework/scripts/client/init_client.sqf b/Missionframework/scripts/client/init_client.sqf index e6516091..8b038c79 100644 --- a/Missionframework/scripts/client/init_client.sqf +++ b/Missionframework/scripts/client/init_client.sqf @@ -1,26 +1,26 @@ [] call compileFinal preprocessFileLineNumbers "scripts\client\misc\init_markers.sqf"; switch (KP_liberation_arsenal) do { - case 1: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\custom.sqf";}; - case 2: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\killahpotatoes.sqf";}; - case 3: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf.sqf";}; - case 4: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf_ace.sqf";}; - case 5: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf_ace_acre.sqf";}; - case 6: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\3cbBAF.sqf";}; - case 7: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\gm_west.sqf";}; - case 8: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\gm_east.sqf";}; - case 9: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\csat.sqf";}; - default {GRLIB_arsenal_weapons = [];GRLIB_arsenal_magazines = [];GRLIB_arsenal_items = [];GRLIB_arsenal_backpacks = [];}; + case 1: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\custom.sqf";}; + case 2: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\killahpotatoes.sqf";}; + case 3: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf.sqf";}; + case 4: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf_ace.sqf";}; + case 5: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\rhsusaf_ace_acre.sqf";}; + case 6: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\3cbBAF.sqf";}; + case 7: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\gm_west.sqf";}; + case 8: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\gm_east.sqf";}; + case 9: {[] call compileFinal preprocessFileLineNumbers "arsenal_presets\csat.sqf";}; + default {GRLIB_arsenal_weapons = [];GRLIB_arsenal_magazines = [];GRLIB_arsenal_items = [];GRLIB_arsenal_backpacks = [];}; }; -if ( typeOf player == "VirtualSpectator_F" ) exitWith { - execVM "scripts\client\markers\empty_vehicles_marker.sqf"; - execVM "scripts\client\markers\fob_markers.sqf"; - execVM "scripts\client\markers\group_icons.sqf"; - execVM "scripts\client\markers\hostile_groups.sqf"; - execVM "scripts\client\markers\sector_manager.sqf"; - execVM "scripts\client\markers\spot_timer.sqf"; - execVM "scripts\client\misc\synchronise_vars.sqf"; - execVM "scripts\client\ui\ui_manager.sqf"; +if (typeOf player == "VirtualSpectator_F") exitWith { + execVM "scripts\client\markers\empty_vehicles_marker.sqf"; + execVM "scripts\client\markers\fob_markers.sqf"; + execVM "scripts\client\markers\group_icons.sqf"; + execVM "scripts\client\markers\hostile_groups.sqf"; + execVM "scripts\client\markers\sector_manager.sqf"; + execVM "scripts\client\markers\spot_timer.sqf"; + execVM "scripts\client\misc\synchronise_vars.sqf"; + execVM "scripts\client\ui\ui_manager.sqf"; }; // This causes the script error with not defined variable _display in File A3\functions_f_bootcamp\Inventory\fn_arsenal.sqf [BIS_fnc_arsenal], line 2122 @@ -42,9 +42,11 @@ execVM "scripts\client\build\build_overlay.sqf"; execVM "scripts\client\build\do_build.sqf"; execVM "scripts\client\commander\enforce_whitelist.sqf"; if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\empty_vehicles_marker.sqf";}; +execVM "scripts\client\markers\fob_markers.sqf"; if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\group_icons.sqf";}; execVM "scripts\client\markers\hostile_groups.sqf"; if (KP_liberation_mapmarkers) then {execVM "scripts\client\markers\huron_marker.sqf";} else {deleteMarkerLocal "huronmarker"}; +execVM "scripts\client\markers\sector_manager.sqf"; execVM "scripts\client\markers\spot_timer.sqf"; execVM "scripts\client\misc\broadcast_squad_colors.sqf"; execVM "scripts\client\misc\disable_remote_sensors.sqf"; @@ -68,7 +70,7 @@ player addEventHandler ["GetInMan", {[_this select 2] call kp_vehicle_permission player addEventHandler ["SeatSwitchedMan", {[_this select 2] call kp_vehicle_permissions;}]; { - [_x] call BIS_fnc_drawCuratorLocations; + [_x] call BIS_fnc_drawCuratorLocations; } foreach allCurators; execVM "scripts\client\ui\intro.sqf"; diff --git a/Missionframework/scripts/shared/fetch_params.sqf b/Missionframework/scripts/shared/fetch_params.sqf index 4e7f76ce..7323edce 100644 --- a/Missionframework/scripts/shared/fetch_params.sqf +++ b/Missionframework/scripts/shared/fetch_params.sqf @@ -81,12 +81,6 @@ if(isServer) then { publicVariable "KP_serverParamsFetched"; diag_log "[KP LIBERATION] [PARAM] Server finished parameters initialization."; - -} else { - waitUntil {sleep 0.5; !isNil "KP_serverParamsFetched"}; - waitUntil {sleep 0.5; KP_serverParamsFetched}; - - private _text = format ["[KP LIBERATION] [PARAM] Client %1 received parameters from server.", name player]; _text remoteExec ["diag_log",2]; }; // Fix for not working float values in mission params