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

@@ -42,7 +42,7 @@ if (_tv>2) then {_dr=1/_tv} else {_dr=1};
_fl setDropInterval _dr;
_sm setDropInterval _dr;
_i=_i+1;
sleep 0.2;
uiSleep 0.2;
};
}; // end of dedicated check
@@ -73,7 +73,7 @@ if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
_splash setparticlecircle [2,[0,3,15]];
_splash setDropInterval 0.002;
sleep 0.2;
uiSleep 0.2;
deletevehicle _wave;deletevehicle _splash;
}; // end of dedicated check
/*
@@ -112,7 +112,7 @@ else
_velz=velocity _v select 2;
if (_velz>1) then {_v setvelocity [velocity _v select 0,velocity _v select 1,0]};
_expl = createVehicle ["HelicopterExploBig", [_pos select 0,_pos select 1,(_pos select 2) + 1], [], 0, "CAN_COLLIDE"];
sleep 0.05;
uiSleep 0.05;
/*
_wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck");
if (_wreck!="") then

View File

@@ -66,7 +66,7 @@ _dirt setDropInterval 0.05;
_dirt setDropInterval _dr;
//_shards setDropInterval _dr;
sleep (0.25 - (_speed / 1000));
uiSleep (0.25 - (_speed / 1000));
_i = _i + 1;
};
deleteVehicle _smoke;
@@ -84,5 +84,5 @@ if (local _v) then
["Burn", _v, _int, _t] call BIS_Effects_globalEvent;
[_v,_int,false] spawn BIS_Effects_Secondaries;
};
sleep 0.5;
uiSleep 0.5;
_v setvelocity [0,0,-0.01];

View File

@@ -21,7 +21,7 @@ while {_int>1} do
};
{
sleep _x;
uiSleep _x;
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
createVehicle ["SmallSecondary", (_v modelToWorld _effect2pos), [], 0, "CAN_COLLIDE"];
}forEach(_list);