Replace sleep with uiSleep

see the below links for more info. uiSleep is based off of a more
accurate method of tracking time, whereas sleep can fluctuate depending
on application performance since it is based on framerate.
https://community.bistudio.com/wiki/uiSleep
https://community.bistudio.com/wiki/sleep_vs_uiSleep
https://community.bistudio.com/wiki/sleep
This commit is contained in:
icomrade
2016-02-17 13:03:17 -05:00
parent acbe103ebd
commit c3ed4e49e1
134 changed files with 276 additions and 278 deletions

View File

@@ -312,28 +312,28 @@ if (!isDedicated) then {
};
openMap false;
closeDialog 0;
if (gear_done) then {sleep 0.001;};
if (gear_done) then {uiSleep 0.001;};
player action ["Gear", player];
if (gear_done) then {sleep 0.001;};
if (gear_done) then {uiSleep 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 {sleep 0.001;};
if (gear_done) then {uiSleep 0.001;};
if (_i in [100,200,299]) then {
closeDialog 0;
player action ["Gear", player];
};
if (_i > 300) exitWith {};
};
if (gear_done) then {sleep 0.001;};
if (gear_done) then {uiSleep 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)};
sleep 0.001;
uiSleep 0.001;
};
};
_dialog
@@ -475,12 +475,12 @@ if (!isDedicated) then {
if (_timeOut >= 12000) then {
1 cutText [localize "str_player_login_timeout", "PLAIN DOWN"];
sleep 10;
uiSleep 10;
endLoadingScreen;
endMission "END1";
};
sleep 0.01;
uiSleep 0.01;
};
};