diff --git a/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf b/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf index 275d195e..fc71d57e 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf @@ -66,6 +66,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then { waituntil {local _playerObject}; // restart masterloop + EPOCH_forceUpdateNow = nil; // Set to nil and wait later until Masterloop has redefined it [] spawn EPOCH_masterLoop; [5, 100] call EPOCH_niteLight; @@ -76,9 +77,10 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then { player removeEventHandler [_x, 0]; player addEventHandler [_x,(["CfgEpochClient", _x, ""] call EPOCH_fnc_returnConfigEntryV2)]; } forEach (["CfgEpochClient", "addEventHandler", []] call EPOCH_fnc_returnConfigEntryV2); + waituntil {uisleep 0.5; !isnil "EPOCH_forceUpdateNow"}; // Wait until Materloop is has set this Variable to false + EPOCH_forceUpdateNow = true; }; } else { deleteVehicle _playerObject; }; -EPOCH_forceUpdateNow = true; diff --git a/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf b/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf index e7c19fdd..760f7454 100644 --- a/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf +++ b/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf @@ -68,14 +68,13 @@ _respawnButton ctrlEnable false; [_display] spawn { disableSerialization; params ["_display"]; - EPOCH_forceUpdate = true; _startTime = diag_tickTime+5; waitUntil { uiSleep 0.2; (isNull _display) || ((_startTime - diag_tickTime) <= 0) }; if (!isNull _display) then { - EPOCH_forceUpdate = true; + missionnamespace setvariable ["EPOCH_forceUpdateNow",true]; }; };