Small fix, revert 1 frame uisleep to regular sleep

I wasn't getting errors without if (gear_done) then {}; surrounding the
uiSleeps, so I don't quite trust the engine was executing them, I also
question the ability of uisleep to handle single frame precision (but I
haven't tested anything regarding this yet).
This commit is contained in:
icomrade
2016-07-28 14:54:50 -04:00
parent 82e2500cac
commit 2cdf9b5806
3 changed files with 10 additions and 10 deletions

View File

@@ -366,28 +366,28 @@ if (!isDedicated) then {
if (isNil "gear_done") then { gear_done = false; };
openMap false;
closeDialog 0;
if (gear_done) then {uisleep 0.001;};
if (gear_done) then {sleep 0.001;};
player action ["Gear", player];
if (gear_done) then {uisleep 0.001;};
if (gear_done) then {sleep 0.001;};
_dialog = findDisplay 106;
_i = 0;
while {isNull _dialog} do {//DO NOT CHANGE TO A FOR LOOP!
_i = _i + 1;
_dialog = findDisplay 106;
if (gear_done) then {uisleep 0.001;};
if (gear_done) then {sleep 0.001;};
if (_i in [100,200,299]) then {
closeDialog 0;
player action ["Gear", player];
};
if (_i > 300) exitWith {};
};
if (gear_done) then {uisleep 0.001;};
if (gear_done) then {sleep 0.001;};
_dialog = findDisplay 106;
if ((parseNumber(_this select 0)) != 0) then {
ctrlActivate (_dialog displayCtrl 157);
if (gear_done) then {
waitUntil {ctrlShown (_dialog displayCtrl 159)};
uisleep 0.001;
sleep 0.001;
};
};
gear_done = true;