Fixes for ForceUpdate

This commit is contained in:
He-Man 2017-12-10 18:25:16 +01:00
parent 7db3836c99
commit 994e6f91e1
2 changed files with 4 additions and 3 deletions

View File

@ -66,6 +66,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
waituntil {local _playerObject}; waituntil {local _playerObject};
// restart masterloop // restart masterloop
EPOCH_forceUpdateNow = nil; // Set to nil and wait later until Masterloop has redefined it
[] spawn EPOCH_masterLoop; [] spawn EPOCH_masterLoop;
[5, 100] call EPOCH_niteLight; [5, 100] call EPOCH_niteLight;
@ -76,9 +77,10 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
player removeEventHandler [_x, 0]; player removeEventHandler [_x, 0];
player addEventHandler [_x,(["CfgEpochClient", _x, ""] call EPOCH_fnc_returnConfigEntryV2)]; player addEventHandler [_x,(["CfgEpochClient", _x, ""] call EPOCH_fnc_returnConfigEntryV2)];
} forEach (["CfgEpochClient", "addEventHandler", []] 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 { } else {
deleteVehicle _playerObject; deleteVehicle _playerObject;
}; };
EPOCH_forceUpdateNow = true;

View File

@ -68,14 +68,13 @@ _respawnButton ctrlEnable false;
[_display] spawn { [_display] spawn {
disableSerialization; disableSerialization;
params ["_display"]; params ["_display"];
EPOCH_forceUpdate = true;
_startTime = diag_tickTime+5; _startTime = diag_tickTime+5;
waitUntil { waitUntil {
uiSleep 0.2; uiSleep 0.2;
(isNull _display) || ((_startTime - diag_tickTime) <= 0) (isNull _display) || ((_startTime - diag_tickTime) <= 0)
}; };
if (!isNull _display) then { if (!isNull _display) then {
EPOCH_forceUpdate = true; missionnamespace setvariable ["EPOCH_forceUpdateNow",true];
}; };
}; };