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

@@ -60,11 +60,11 @@ if (_characterID != "0") then {
//Check if update is requested
if (_isNewPos || _force) then {
//diag_log ("position..." + str(_isNewPos) + " / " + str(_force)); sleep 0.05;
//diag_log ("position..." + str(_isNewPos) + " / " + str(_force)); uiSleep 0.05;
if (((_charPos select 0) == 0) && ((_charPos select 1) == 0)) then {
//Zero Position
} else {
//diag_log ("getting position..."); sleep 0.05;
//diag_log ("getting position..."); uiSleep 0.05;
_playerPos = [round(direction _character),_charPos];
_lastPos = _character getVariable["lastPos",_charPos];
if (count _lastPos > 2 && count _charPos > 2) then {
@@ -76,12 +76,12 @@ if (_characterID != "0") then {
if (count _charPos < 3) then {
_playerPos = [];
};
//diag_log ("position = " + str(_playerPos)); sleep 0.05;
//diag_log ("position = " + str(_playerPos)); uiSleep 0.05;
};
_character setVariable ["posForceUpdate",false,true];
};
if (_isNewGear || _forceGear) then {
//diag_log ("gear..."); sleep 0.05;
//diag_log ("gear..."); uiSleep 0.05;
_playerGear = [weapons _character,_magazines];
//diag_log ("playerGear: " +str(_playerGear));
_backpack = unitBackpack _character;
@@ -93,11 +93,11 @@ if (_characterID != "0") then {
};
};
if (_isNewMed || _force) then {
//diag_log ("medical..."); sleep 0.05;
//diag_log ("medical..."); uiSleep 0.05;
if (!(_character getVariable["USEC_isDead",false])) then {
//diag_log ("medical check..."); sleep 0.05;
//diag_log ("medical check..."); uiSleep 0.05;
_medical = _character call player_sumMedical;
//diag_log ("medical result..." + str(_medical)); sleep 0.05;
//diag_log ("medical result..." + str(_medical)); uiSleep 0.05;
};
_character setVariable ["medForceUpdate",false,true];
};