From c3ed4e49e1e6dc4fd711b29ee63a7d2c877581a4 Mon Sep 17 00:00:00 2001 From: icomrade Date: Wed, 17 Feb 2016 13:03:17 -0500 Subject: [PATCH] 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 --- SQF/dayz_code/Configs/rscTitles.hpp | 2 +- SQF/dayz_code/actions/boil.sqf | 4 +-- SQF/dayz_code/actions/call_zombies.sqf | 2 +- SQF/dayz_code/actions/cook.sqf | 2 +- SQF/dayz_code/actions/dog/follow.sqf | 2 +- SQF/dayz_code/actions/dog/stay.sqf | 2 +- SQF/dayz_code/actions/dog/warn.sqf | 2 +- SQF/dayz_code/actions/fill_nearestVehicle.sqf | 4 +-- SQF/dayz_code/actions/fill_startGenerator.sqf | 2 +- SQF/dayz_code/actions/fire_light.sqf | 2 +- SQF/dayz_code/actions/fire_pack.sqf | 2 +- SQF/dayz_code/actions/flare_pickup.sqf | 4 +-- SQF/dayz_code/actions/gather_meat.sqf | 2 +- SQF/dayz_code/actions/gather_zparts.sqf | 2 +- SQF/dayz_code/actions/halo_jump.sqf | 2 +- SQF/dayz_code/actions/jerry_fill.sqf | 4 +-- SQF/dayz_code/actions/pack.sqf | 2 +- SQF/dayz_code/actions/player_build.sqf | 4 +-- .../actions/player_build_controls.sqf | 2 +- .../actions/player_build_publish.sqf | 2 +- SQF/dayz_code/actions/player_copyKey.sqf | 2 +- .../actions/player_countmagazines.sqf | 4 +-- SQF/dayz_code/actions/player_craftItem.sqf | 4 +-- SQF/dayz_code/actions/player_drink.sqf | 6 ++--- SQF/dayz_code/actions/player_eat.sqf | 6 ++--- SQF/dayz_code/actions/player_flipvehicle.sqf | 6 ++--- SQF/dayz_code/actions/player_goFishing.sqf | 4 +-- SQF/dayz_code/actions/player_harvestPlant.sqf | 2 +- SQF/dayz_code/actions/player_heliLift.sqf | 2 +- SQF/dayz_code/actions/player_loadCrate.sqf | 2 +- SQF/dayz_code/actions/player_makefire.sqf | 2 +- SQF/dayz_code/actions/player_setTrap.sqf | 2 +- SQF/dayz_code/actions/player_sleep.sqf | 14 +++++----- SQF/dayz_code/actions/pzombie/pz_attack.sqf | 2 +- SQF/dayz_code/actions/pzombie/pz_feed.sqf | 4 +-- SQF/dayz_code/actions/pzombie/pz_vision.sqf | 2 +- SQF/dayz_code/actions/refuel.sqf | 6 ++--- SQF/dayz_code/actions/remove.sqf | 2 +- SQF/dayz_code/actions/repair.sqf | 2 +- SQF/dayz_code/actions/salvage.sqf | 2 +- SQF/dayz_code/actions/siphonFuel.sqf | 6 ++--- SQF/dayz_code/actions/snap_build.sqf | 12 ++++----- SQF/dayz_code/actions/stopGenerator.sqf | 2 +- SQF/dayz_code/actions/tame_dog.sqf | 2 +- SQF/dayz_code/actions/tent_pitch.sqf | 4 +-- SQF/dayz_code/actions/tow_AttachStraps.sqf | 2 +- SQF/dayz_code/actions/tow_DetachStraps.sqf | 2 +- SQF/dayz_code/actions/trade_any_bicycle.sqf | 2 +- .../actions/trade_any_bicycle_old.sqf | 2 +- SQF/dayz_code/actions/trade_any_boat.sqf | 2 +- SQF/dayz_code/actions/trade_any_boat_old.sqf | 2 +- SQF/dayz_code/actions/trade_any_vehicle.sqf | 2 +- .../actions/trade_any_vehicle_free.sqf | 2 +- .../actions/trade_any_vehicle_old.sqf | 2 +- SQF/dayz_code/actions/trade_backpacks.sqf | 2 +- SQF/dayz_code/actions/trade_backpacks_old.sqf | 2 +- SQF/dayz_code/actions/trade_items.sqf | 4 +-- SQF/dayz_code/actions/trade_items_old.sqf | 4 +-- SQF/dayz_code/actions/trade_items_wo_db.sqf | 4 +-- SQF/dayz_code/actions/trade_weapons.sqf | 2 +- SQF/dayz_code/actions/trade_weapons_old.sqf | 2 +- SQF/dayz_code/actions/unpack.sqf | 2 +- SQF/dayz_code/actions/vault_pitch.sqf | 10 +++---- SQF/dayz_code/actions/veh_seatActions.sqf | 2 +- SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf | 8 +++--- SQF/dayz_code/compile/fn_lightFunctions.sqf | 4 +-- SQF/dayz_code/compile/fn_unconscious.sqf | 4 +-- SQF/dayz_code/compile/local_gutObject.sqf | 4 +-- SQF/dayz_code/compile/local_gutObjectZ.sqf | 4 +-- SQF/dayz_code/compile/local_lights_house.sqf | 2 +- SQF/dayz_code/compile/local_lights_init.sqf | 10 +++---- SQF/dayz_code/compile/local_lights_off.sqf | 2 +- SQF/dayz_code/compile/object_monitorGear.sqf | 2 +- SQF/dayz_code/compile/object_roadFlare.sqf | 2 +- SQF/dayz_code/compile/player_animalCheck.sqf | 4 +-- SQF/dayz_code/compile/player_checkStealth.sqf | 2 +- SQF/dayz_code/compile/player_crossbowBolt.sqf | 4 +-- SQF/dayz_code/compile/player_death.sqf | 10 +++---- .../compile/player_humanityChange.sqf | 2 +- .../compile/player_humanityMorph.sqf | 2 +- SQF/dayz_code/compile/player_lockVault.sqf | 4 +-- SQF/dayz_code/compile/player_music.sqf | 2 +- SQF/dayz_code/compile/player_onPause.sqf | 2 +- SQF/dayz_code/compile/player_packTent.sqf | 2 +- SQF/dayz_code/compile/player_packVault.sqf | 6 ++--- .../compile/player_projectileNear.sqf | 2 +- SQF/dayz_code/compile/player_switchModel.sqf | 6 ++--- SQF/dayz_code/compile/player_throwObject.sqf | 2 +- .../compile/player_traderMenuConfig.sqf | 2 +- .../compile/player_traderMenuHive.sqf | 2 +- SQF/dayz_code/compile/player_unlockVault.sqf | 8 +++--- SQF/dayz_code/compile/player_zombieAttack.sqf | 2 +- SQF/dayz_code/compile/tame_dog.sqf | 2 +- SQF/dayz_code/compile/zombie_generate.sqf | 8 +++--- .../external/DynamicWeatherEffects.sqf | 14 +++++----- .../R3F_Realism/R3F_Tired/R3F_DoTired.sqf | 4 +-- .../R3F_Realism/R3F_Weight/R3F_DoWeight.sqf | 2 +- SQF/dayz_code/init/compiles.sqf | 14 +++++----- SQF/dayz_code/init/object_pickupAction.sqf | 2 +- SQF/dayz_code/medical/bandage.sqf | 4 +-- SQF/dayz_code/medical/carry.sqf | 6 ++--- SQF/dayz_code/medical/carry_old.sqf | 6 ++--- SQF/dayz_code/medical/drag.sqf | 6 ++--- SQF/dayz_code/medical/epinephrine.sqf | 4 +-- SQF/dayz_code/medical/init_medical.sqf | 10 +++---- SQF/dayz_code/medical/load/load_act.sqf | 2 +- SQF/dayz_code/medical/load/load_wounded.sqf | 12 ++++----- SQF/dayz_code/medical/load/unLoad_act.sqf | 8 +++--- SQF/dayz_code/medical/morphine.sqf | 4 +-- SQF/dayz_code/medical/painkiller.sqf | 2 +- SQF/dayz_code/medical/publicEH/noDamage.sqf | 2 +- SQF/dayz_code/medical/pulse.sqf | 2 +- SQF/dayz_code/medical/self_transfusion.sqf | 4 +-- SQF/dayz_code/medical/setup_functions_med.sqf | 14 +++++----- SQF/dayz_code/medical/transfusion.sqf | 2 +- .../system/BIS_Effects/airdestruction.sqf | 6 ++--- .../BIS_Effects/airdestructionstage2.sqf | 4 +-- .../system/BIS_Effects/secondaries.sqf | 2 +- SQF/dayz_code/system/REsec.sqf | 2 +- SQF/dayz_code/system/antihack.sqf | 12 ++++----- SQF/dayz_code/system/building_monitor.sqf | 2 +- SQF/dayz_code/system/dog_agent.fsm | 4 +-- SQF/dayz_code/system/fire_monitor.sqf | 6 ++--- SQF/dayz_code/system/player_monitor.fsm | 12 ++++----- SQF/dayz_code/system/player_spawn_1.sqf | 2 +- SQF/dayz_code/system/player_spawn_2.sqf | 2 +- SQF/dayz_server/compile/server_playerSync.sqf | 14 +++++----- .../compile/server_publishVehicle.sqf | 2 +- .../compile/server_publishVehicle2.sqf | 4 +-- .../compile/server_publishVehicle3.sqf | 2 +- .../compile/server_spawnCrashSite.sqf | 4 +-- SQF/dayz_server/compile/server_spawnEvent.sqf | 2 +- SQF/dayz_server/init/server_functions.sqf | 26 +++++++++---------- SQF/dayz_server/system/server_monitor.sqf | 2 +- 134 files changed, 276 insertions(+), 278 deletions(-) diff --git a/SQF/dayz_code/Configs/rscTitles.hpp b/SQF/dayz_code/Configs/rscTitles.hpp index ccc265dd3..d2ca07887 100644 --- a/SQF/dayz_code/Configs/rscTitles.hpp +++ b/SQF/dayz_code/Configs/rscTitles.hpp @@ -86,7 +86,7 @@ class RscDisplayStart { class RscDisplayGetReady; class RscDisplayClientGetReady: RscDisplayGetReady { // could probably add a check in the spawn but couldn't test with multiple players - onload = "private ['_dummy']; _dummy = [_this,'onload'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf'; _this spawn { while { !isNull (findDisplay 53) } do { ctrlActivate ((_this select 0) displayCtrl 1); sleep 0.1; }; };"; + onload = "private ['_dummy']; _dummy = [_this,'onload'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf'; _this spawn { while { !isNull (findDisplay 53) } do { ctrlActivate ((_this select 0) displayCtrl 1); uiSleep 0.1; }; };"; }; class RscDisplayDebriefing: RscStandardDisplay { onLoad = "ctrlActivate ((_this select 0) displayCtrl 2)"; diff --git a/SQF/dayz_code/actions/boil.sqf b/SQF/dayz_code/actions/boil.sqf index a4d14872d..ac58e7855 100644 --- a/SQF/dayz_code/actions/boil.sqf +++ b/SQF/dayz_code/actions/boil.sqf @@ -31,14 +31,14 @@ if (_hasbottleitem && _hastinitem) then { _removed = _removed + ([player,"ItemWaterbottle",_qty] call BIS_fnc_invRemove); [1,1] call dayz_HungerThirst; player playActionNow "Medic"; - sleep 1; + uiSleep 1; _dis=10; _sfx = "cook"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; - sleep 5; + uiSleep 5; // Add back only number of removed for "_x" from 1 to _removed do { diff --git a/SQF/dayz_code/actions/call_zombies.sqf b/SQF/dayz_code/actions/call_zombies.sqf index e8279b9a8..4bd67d875 100644 --- a/SQF/dayz_code/actions/call_zombies.sqf +++ b/SQF/dayz_code/actions/call_zombies.sqf @@ -15,7 +15,7 @@ s_player_callzombies = 1; [player,100,true,(getPosATL player)] spawn player_alertZombies; // wait a bit -sleep 3; +uiSleep 3; // allow menu again s_player_callzombies = -1; diff --git a/SQF/dayz_code/actions/cook.sqf b/SQF/dayz_code/actions/cook.sqf index b7d95eaf1..bd2b5eb3a 100644 --- a/SQF/dayz_code/actions/cook.sqf +++ b/SQF/dayz_code/actions/cook.sqf @@ -50,7 +50,7 @@ _cookedmeat = meatcooked; if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/dog/follow.sqf b/SQF/dayz_code/actions/dog/follow.sqf index 4379ed9fe..71e01fa61 100644 --- a/SQF/dayz_code/actions/dog/follow.sqf +++ b/SQF/dayz_code/actions/dog/follow.sqf @@ -8,7 +8,7 @@ if(_whistle) then { [nil,player,rSAY,["dog_callBack", 120]] call RE; }; -sleep 1; +uiSleep 1; if (_dog distance player <= 900) then { _handle setFSMVariable ["_command","return"]; diff --git a/SQF/dayz_code/actions/dog/stay.sqf b/SQF/dayz_code/actions/dog/stay.sqf index 0c717dc69..bdad7956b 100644 --- a/SQF/dayz_code/actions/dog/stay.sqf +++ b/SQF/dayz_code/actions/dog/stay.sqf @@ -8,6 +8,6 @@ _watchDog = _handle getFSMVariable "_watchDog"; _anim = animationState _dog; if (_anim == "Dog_SitDown" && _watchDog) then { //[objNull, _dog, rSwitchMove,"Dog_SitUp"] call RE; - //sleep 0.5; + //uiSleep 0.5; [objNull, _dog, rSwitchMove,"Dog_LieDown"] call RE; }; \ No newline at end of file diff --git a/SQF/dayz_code/actions/dog/warn.sqf b/SQF/dayz_code/actions/dog/warn.sqf index f8e9eaca7..b7c02ad90 100644 --- a/SQF/dayz_code/actions/dog/warn.sqf +++ b/SQF/dayz_code/actions/dog/warn.sqf @@ -22,7 +22,7 @@ _warn = { [_dog,"dog_growl",2,false] call dayz_zombieSpeak; }; }; - sleep 2; + uiSleep 2; }; }; diff --git a/SQF/dayz_code/actions/fill_nearestVehicle.sqf b/SQF/dayz_code/actions/fill_nearestVehicle.sqf index f7d51061c..e12a9e11b 100644 --- a/SQF/dayz_code/actions/fill_nearestVehicle.sqf +++ b/SQF/dayz_code/actions/fill_nearestVehicle.sqf @@ -76,7 +76,7 @@ if(_IsNearVehicle >= 1) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -143,7 +143,7 @@ if(_IsNearVehicle >= 1) then { }; if(_abort) exitWith {}; - sleep 1; + uiSleep 1; }; } else { diff --git a/SQF/dayz_code/actions/fill_startGenerator.sqf b/SQF/dayz_code/actions/fill_startGenerator.sqf index 48529e77e..aadb4c9aa 100644 --- a/SQF/dayz_code/actions/fill_startGenerator.sqf +++ b/SQF/dayz_code/actions/fill_startGenerator.sqf @@ -36,7 +36,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/fire_light.sqf b/SQF/dayz_code/actions/fire_light.sqf index b30ae49df..ffaaa68d7 100644 --- a/SQF/dayz_code/actions/fire_light.sqf +++ b/SQF/dayz_code/actions/fire_light.sqf @@ -8,7 +8,7 @@ if (_isOk) then { _classname = "Land_Fire"; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; - sleep 6; + uiSleep 6; dayz_hasFire = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; dayz_hasFire setDir _dir; player reveal dayz_hasFire; diff --git a/SQF/dayz_code/actions/fire_pack.sqf b/SQF/dayz_code/actions/fire_pack.sqf index d4a22dc4c..8b898788c 100644 --- a/SQF/dayz_code/actions/fire_pack.sqf +++ b/SQF/dayz_code/actions/fire_pack.sqf @@ -5,7 +5,7 @@ player removeAction s_player_fireout; s_player_fireout = 1; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; -sleep 6; +uiSleep 6; if(_obj isKindOf "Land_fire") then { dayz_hasFire = objNull; deleteVehicle _obj; diff --git a/SQF/dayz_code/actions/flare_pickup.sqf b/SQF/dayz_code/actions/flare_pickup.sqf index a1d947392..e56f434b4 100644 --- a/SQF/dayz_code/actions/flare_pickup.sqf +++ b/SQF/dayz_code/actions/flare_pickup.sqf @@ -1,7 +1,7 @@ private ["_flare","_text"]; _flare = _this select 3; player playActionNow "PutDown"; -sleep 2; +uiSleep 2; _flare attachTo [player,[0,0,0],"granat2"]; [_flare, -90, -10] call object_setpitchbank; [_flare] call FNC_GetSetPos; @@ -15,7 +15,7 @@ _text = getText (configFile >> "CfgAmmo" >> (typeOf _flare) >> "displayName"); s_player_dropflare = player addAction [format[localize "str_actions_medical_16",_text], "\z\addons\dayz_code\actions\flare_drop.sqf",_flare, 1, false, true, "", ""]; while {(alive _flare) && dayz_hasLight} do { - sleep 0.1; + uiSleep 0.1; }; if (dayz_hasLight) then { dayz_hasLight = false; diff --git a/SQF/dayz_code/actions/gather_meat.sqf b/SQF/dayz_code/actions/gather_meat.sqf index fefb63b09..a18346dbf 100644 --- a/SQF/dayz_code/actions/gather_meat.sqf +++ b/SQF/dayz_code/actions/gather_meat.sqf @@ -44,7 +44,7 @@ if ((_hasKnife || _hasKnifeBlunt) && !_hasHarvested) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/gather_zparts.sqf b/SQF/dayz_code/actions/gather_zparts.sqf index e9f37086e..8953db93e 100644 --- a/SQF/dayz_code/actions/gather_zparts.sqf +++ b/SQF/dayz_code/actions/gather_zparts.sqf @@ -45,7 +45,7 @@ if ((_hasKnife || _hasKnifeBlunt) && !_hasHarvested) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/halo_jump.sqf b/SQF/dayz_code/actions/halo_jump.sqf index b12198f5f..88f843350 100644 --- a/SQF/dayz_code/actions/halo_jump.sqf +++ b/SQF/dayz_code/actions/halo_jump.sqf @@ -2,7 +2,7 @@ DZE_myHaloVehicle removeAction s_halo_action; s_halo_action = -1; player action [ "eject", (vehicle player)]; -sleep 1; +uiSleep 1; player spawn BIS_fnc_halo; player setvelocity [0,120*0.8,0]; player setdir 0; \ No newline at end of file diff --git a/SQF/dayz_code/actions/jerry_fill.sqf b/SQF/dayz_code/actions/jerry_fill.sqf index c3b82fdee..2f961b4a2 100644 --- a/SQF/dayz_code/actions/jerry_fill.sqf +++ b/SQF/dayz_code/actions/jerry_fill.sqf @@ -55,7 +55,7 @@ _qty = count _fuelCans; if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -82,7 +82,7 @@ _qty = count _fuelCans; }; }; - sleep 1; + uiSleep 1; if(_abort) exitWith {}; } count _fuelCans; diff --git a/SQF/dayz_code/actions/pack.sqf b/SQF/dayz_code/actions/pack.sqf index 151500c8e..261b5e1ca 100644 --- a/SQF/dayz_code/actions/pack.sqf +++ b/SQF/dayz_code/actions/pack.sqf @@ -3,7 +3,7 @@ _array = _this select 3; _object = _array select 0; _type = TypeOf(_object); player playActionNow "Medic"; -sleep 8; +uiSleep 8; player addBackpack format["%1_US_Bag_EP1",_type]; deleteVehicle _object; r_action = false; diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 2da975bc1..bb6f101e4 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -313,7 +313,7 @@ if (_hasrequireditem) then { }; - sleep 0.5; + uiSleep 0.5; _location2 = getPosATL player; @@ -434,7 +434,7 @@ if (_hasrequireditem) then { if (DZE_cancelBuilding) exitWith { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/player_build_controls.sqf b/SQF/dayz_code/actions/player_build_controls.sqf index 6bf17836e..5b22021d2 100644 --- a/SQF/dayz_code/actions/player_build_controls.sqf +++ b/SQF/dayz_code/actions/player_build_controls.sqf @@ -146,7 +146,7 @@ while {_isOk} do { }; }; - sleep 0.5; + uiSleep 0.5; _location2 = [player] call FNC_GetPos; _objectHelperPos = [_objectHelper] call FNC_GetPos; diff --git a/SQF/dayz_code/actions/player_build_publish.sqf b/SQF/dayz_code/actions/player_build_publish.sqf index eefbd1ea7..dc780b257 100644 --- a/SQF/dayz_code/actions/player_build_publish.sqf +++ b/SQF/dayz_code/actions/player_build_publish.sqf @@ -100,7 +100,7 @@ if(!_cancel) then { if (DZE_cancelBuilding) exitWith { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/player_copyKey.sqf b/SQF/dayz_code/actions/player_copyKey.sqf index 62222e7cd..3117d0689 100644 --- a/SQF/dayz_code/actions/player_copyKey.sqf +++ b/SQF/dayz_code/actions/player_copyKey.sqf @@ -49,7 +49,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/player_countmagazines.sqf b/SQF/dayz_code/actions/player_countmagazines.sqf index f460c7e9d..3bc5c2888 100644 --- a/SQF/dayz_code/actions/player_countmagazines.sqf +++ b/SQF/dayz_code/actions/player_countmagazines.sqf @@ -47,7 +47,7 @@ if ((typeOf (unitBackPack player)) != "") then { ctrlActivate (_dialog displayCtrl 157); if (gear_done) then { waitUntil {ctrlShown (_dialog displayCtrl 159)}; - sleep 0.001; + uiSleep 0.001; }; for "_i" from 5000 to (5000 + _count) do { @@ -66,5 +66,5 @@ if ((typeOf (unitBackPack player)) != "") then { }; (findDisplay 106) closeDisplay 0; -if (gear_done) then {sleep 0.001;}; +if (gear_done) then {uiSleep 0.001;}; _magazineArray diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 92a8677df..c234d8cc3 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -145,7 +145,7 @@ if (_canDo) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -252,7 +252,7 @@ if (_canDo) then { // Add crafted item cutText [format[(localize "str_epoch_player_150"),_textCreate,_countOut], "PLAIN DOWN"]; // sleep here - sleep 1; + uiSleep 1; } forEach _selectedRecipeOutput; _tradeComplete = _tradeComplete+1; diff --git a/SQF/dayz_code/actions/player_drink.sqf b/SQF/dayz_code/actions/player_drink.sqf index 3eb937d81..444df4059 100644 --- a/SQF/dayz_code/actions/player_drink.sqf +++ b/SQF/dayz_code/actions/player_drink.sqf @@ -32,7 +32,7 @@ if (vehicle player != player) then { _invehicle = true; }; -sleep 1; +uiSleep 1; if (["ItemWaterbottle",_itemorignal] call fnc_inString) then { //low alert && sound radius @@ -53,7 +53,7 @@ if (_hasoutput) then { _itemtodrop = drink_output select (drink_with_output find _itemorignal); if (!_invehicle) then { - sleep 3; + uiSleep 3; _nearByPile = nearestObjects [(getPosATL player), ["WeaponHolder","WeaponHolderBase"],2]; if (count _nearByPile == 0) then { _iPos = getPosATL player; @@ -65,7 +65,7 @@ if (_hasoutput) then { }; _item addMagazineCargoGlobal [_itemtodrop,1]; } else { - sleep 2; + uiSleep 2; (vehicle player) addMagazineCargoGlobal [_itemtodrop,1]; }; }; diff --git a/SQF/dayz_code/actions/player_eat.sqf b/SQF/dayz_code/actions/player_eat.sqf index be94a41b6..e65242a08 100644 --- a/SQF/dayz_code/actions/player_eat.sqf +++ b/SQF/dayz_code/actions/player_eat.sqf @@ -35,7 +35,7 @@ if (vehicle player != player) then { _invehicle = true; }; -sleep 1; +uiSleep 1; _dis=6; _sfx = "eat"; @@ -53,7 +53,7 @@ if (_hasoutput) then { _itemtodrop = food_output select (food_with_output find _itemorignal); if (!_invehicle) then { - sleep 3; + uiSleep 3; _nearByPile = nearestObjects [(getPosATL player), ["WeaponHolder","WeaponHolderBase"],2]; if (count _nearByPile == 0) then { _iPos = getPosATL player; @@ -65,7 +65,7 @@ if (_hasoutput) then { }; _item addMagazineCargoGlobal [_itemtodrop,1]; } else { - sleep 2; + uiSleep 2; (vehicle player) addMagazineCargoGlobal [_itemtodrop,1]; }; }; diff --git a/SQF/dayz_code/actions/player_flipvehicle.sqf b/SQF/dayz_code/actions/player_flipvehicle.sqf index b50c8407e..0191965aa 100644 --- a/SQF/dayz_code/actions/player_flipvehicle.sqf +++ b/SQF/dayz_code/actions/player_flipvehicle.sqf @@ -5,18 +5,18 @@ _object = _this select 3; //Standup //player playMove "amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon"; -//sleep 1; +//uiSleep 1; //waitUntil { animationState player != "amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon"}; //Kneel Down player playMove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"; waitUntil { animationState player != "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"}; -sleep 2; +uiSleep 2; //_object setpos _position; _object setvectorup [0,0,1]; [player,"scream",0,true] call dayz_zombieSpeak; [player,20,true,(getPosATL player)] spawn player_alertZombies; -sleep 3; +uiSleep 3; //Other possibilities diff --git a/SQF/dayz_code/actions/player_goFishing.sqf b/SQF/dayz_code/actions/player_goFishing.sqf index 1d1ef6c02..212472881 100644 --- a/SQF/dayz_code/actions/player_goFishing.sqf +++ b/SQF/dayz_code/actions/player_goFishing.sqf @@ -36,7 +36,7 @@ while {_isOk} do { cutText [(localize "str_epoch_player_68"), "PLAIN DOWN"]; } else { - sleep 2; + uiSleep 2; _rnd = 50; @@ -75,7 +75,7 @@ while {_isOk} do { _counter = _counter + 1; if(_counter == 10) then { _isOk = false; - sleep 2; + uiSleep 2; cutText [(localize "str_epoch_player_71"), "PLAIN DOWN"]; }; }; diff --git a/SQF/dayz_code/actions/player_harvestPlant.sqf b/SQF/dayz_code/actions/player_harvestPlant.sqf index 43b784b1c..28fc7074c 100644 --- a/SQF/dayz_code/actions/player_harvestPlant.sqf +++ b/SQF/dayz_code/actions/player_harvestPlant.sqf @@ -77,7 +77,7 @@ if (count(_findNearestTree) >= 1) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; diff --git a/SQF/dayz_code/actions/player_heliLift.sqf b/SQF/dayz_code/actions/player_heliLift.sqf index 24dd0778f..d656da26d 100644 --- a/SQF/dayz_code/actions/player_heliLift.sqf +++ b/SQF/dayz_code/actions/player_heliLift.sqf @@ -60,7 +60,7 @@ while {r_doLoop} do { if (r_interrupt || _moved || (typeName _attached == "OBJECT") || (typeName _hasAttached == "OBJECT")) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/player_loadCrate.sqf b/SQF/dayz_code/actions/player_loadCrate.sqf index 47b7d40d3..094c891ce 100644 --- a/SQF/dayz_code/actions/player_loadCrate.sqf +++ b/SQF/dayz_code/actions/player_loadCrate.sqf @@ -38,7 +38,7 @@ player addMagazine "bulk_empty"; [1,1] call dayz_HungerThirst; // Change to optional wait to complete player playActionNow "Medic"; -sleep 6; +uiSleep 6; _b0x1337 = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; _b0x1337 setDir _dir; diff --git a/SQF/dayz_code/actions/player_makefire.sqf b/SQF/dayz_code/actions/player_makefire.sqf index 2c3577569..ee7863e19 100644 --- a/SQF/dayz_code/actions/player_makefire.sqf +++ b/SQF/dayz_code/actions/player_makefire.sqf @@ -14,7 +14,7 @@ if (_hasWood) then { _classname = "Land_Fire_DZ"; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; - sleep 6; + uiSleep 6; _fire = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; _fire setDir _dir; player reveal _fire; diff --git a/SQF/dayz_code/actions/player_setTrap.sqf b/SQF/dayz_code/actions/player_setTrap.sqf index e996f5f1b..5e67dc31c 100644 --- a/SQF/dayz_code/actions/player_setTrap.sqf +++ b/SQF/dayz_code/actions/player_setTrap.sqf @@ -19,7 +19,7 @@ player removeMagazine _item; _location = getPosATL player; player playActionNow "PutDown"; -sleep 1; +uiSleep 1; _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; _dir = getDir player; diff --git a/SQF/dayz_code/actions/player_sleep.sqf b/SQF/dayz_code/actions/player_sleep.sqf index 3577cc9fd..4be170bfc 100644 --- a/SQF/dayz_code/actions/player_sleep.sqf +++ b/SQF/dayz_code/actions/player_sleep.sqf @@ -4,43 +4,43 @@ player playMove "amovpsitmstpsraswrfldnon_smoking"; // - Sitting smoking waitUntil { animationState player != "amovpsitmstpsraswrfldnon_smoking"}; -sleep 5; +uiSleep 5; player playMove "amovpsitmstpsraswrfldnon_weaponcheck1"; // - Sitting checking weapon waitUntil { animationState player != "amovpsitmstpsraswrfldnon_weaponcheck1"}; -sleep 5; +uiSleep 5; player playMove "AidlPpneMstpSnonWnonDnon_SleepC_layDown"; waitUntil { animationState player != "AidlPpneMstpSnonWnonDnon_SleepC_layDown"}; -sleep 5; +uiSleep 5; player playMove "AidlPpneMstpSnonWnonDnon_SleepC_lookAround"; waitUntil { animationState player != "AidlPpneMstpSnonWnonDnon_SleepC_lookAround"}; -sleep 5; +uiSleep 5; player playMove "AidlPpneMstpSnonWnonDnon_SleepC_scratch"; waitUntil { animationState player != "AidlPpneMstpSnonWnonDnon_SleepC_scratch"}; -sleep 5; +uiSleep 5; player playMove "AidlPpneMstpSnonWnonDnon_SleepC_sleep"; waitUntil { animationState player != "AidlPpneMstpSnonWnonDnon_SleepC_sleep"}; -sleep 5; +uiSleep 5; player playMove "AidlPpneMstpSnonWnonDnon_SleepC_sleep0"; waitUntil { animationState player != "AidlPpneMstpSnonWnonDnon_SleepC_sleep0"}; -sleep 5; +uiSleep 5; player playMove "AidlPpneMstpSnonWnonDnon_SleepC_standUp"; diff --git a/SQF/dayz_code/actions/pzombie/pz_attack.sqf b/SQF/dayz_code/actions/pzombie/pz_attack.sqf index 5fc5b14e5..de273b0a2 100644 --- a/SQF/dayz_code/actions/pzombie/pz_attack.sqf +++ b/SQF/dayz_code/actions/pzombie/pz_attack.sqf @@ -21,6 +21,6 @@ if (!isNull cursorTarget) then { [player,"hit",0,false] call dayz_zombieSpeak; }; - sleep 1; + uiSleep 1; player switchmove ""; }; \ No newline at end of file diff --git a/SQF/dayz_code/actions/pzombie/pz_feed.sqf b/SQF/dayz_code/actions/pzombie/pz_feed.sqf index 62514fba2..cb2c3d478 100644 --- a/SQF/dayz_code/actions/pzombie/pz_feed.sqf +++ b/SQF/dayz_code/actions/pzombie/pz_feed.sqf @@ -13,7 +13,7 @@ if(!(alive _item)) then { _move = "ZombieFeed" + str(_rnd); player playMoveNow _move; - sleep 1; + uiSleep 1; // player playActionNow "PutDown"; [player,50,true,(getPosATL player)] spawn player_alertZombies; @@ -22,7 +22,7 @@ if(!(alive _item)) then { _item setVariable["meatHarvested",true,true]; - sleep 1; + uiSleep 1; _regen = 200; diff --git a/SQF/dayz_code/actions/pzombie/pz_vision.sqf b/SQF/dayz_code/actions/pzombie/pz_vision.sqf index 6d3a1118c..b3f095787 100644 --- a/SQF/dayz_code/actions/pzombie/pz_vision.sqf +++ b/SQF/dayz_code/actions/pzombie/pz_vision.sqf @@ -50,7 +50,7 @@ while { aperture < _oldAperture } do { aperture = aperture + 0.0005; setAperture aperture; - sleep 0.001; + uiSleep 0.001; }; player setVariable ["NV", ["ON", _oldAperture]]; diff --git a/SQF/dayz_code/actions/refuel.sqf b/SQF/dayz_code/actions/refuel.sqf index 6c8d1f34f..a08bf29a0 100644 --- a/SQF/dayz_code/actions/refuel.sqf +++ b/SQF/dayz_code/actions/refuel.sqf @@ -71,7 +71,7 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"]; if (vehicle player != player) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -86,7 +86,7 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"]; } else { // Alternate method in water make sure player stays in one spot for 6 seconds _location1 = getPosATL player; - sleep 6; + uiSleep 6; _location2 = getPosATL player; if(_location1 distance _location2 < 3) then { _finished = true; @@ -122,7 +122,7 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"]; call fnc_usec_medic_removeActions; r_action = false; - sleep 1; + uiSleep 1; } else { _abort = true; }; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 7a4365aaf..41b9fede7 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -119,7 +119,7 @@ while {_isOk} do { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; diff --git a/SQF/dayz_code/actions/repair.sqf b/SQF/dayz_code/actions/repair.sqf index 0000db2b0..ebfbb9220 100644 --- a/SQF/dayz_code/actions/repair.sqf +++ b/SQF/dayz_code/actions/repair.sqf @@ -49,7 +49,7 @@ if (_section && _hasToolbox) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/salvage.sqf b/SQF/dayz_code/actions/salvage.sqf index 952f0d739..c5f233456 100644 --- a/SQF/dayz_code/actions/salvage.sqf +++ b/SQF/dayz_code/actions/salvage.sqf @@ -50,7 +50,7 @@ if (_hasToolbox) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/siphonFuel.sqf b/SQF/dayz_code/actions/siphonFuel.sqf index e8a10f4f5..3a2e2599d 100644 --- a/SQF/dayz_code/actions/siphonFuel.sqf +++ b/SQF/dayz_code/actions/siphonFuel.sqf @@ -77,7 +77,7 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"]; if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -92,7 +92,7 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"]; } else { // Alternate method in water make sure player stays in one spot for 6 seconds _location1 = getPosATL player; - sleep 6; + uiSleep 6; _location2 = getPosATL player; if(_location1 distance _location2 < 3) then { _finished = true; @@ -128,7 +128,7 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"]; call fnc_usec_medic_removeActions; r_action = false; - sleep 1; + uiSleep 1; } else { _abort = true; }; diff --git a/SQF/dayz_code/actions/snap_build.sqf b/SQF/dayz_code/actions/snap_build.sqf index 850af53d3..be479cf6a 100644 --- a/SQF/dayz_code/actions/snap_build.sqf +++ b/SQF/dayz_code/actions/snap_build.sqf @@ -115,7 +115,7 @@ fnc_snapDistanceCheck = { _objectHelper setPosATL _distClosestPointFoundPos; }; _objectHelper setDir _distClosestPointFoundDir; - waitUntil {sleep 0.1; !helperDetach}; + waitUntil {uiSleep 0.1; !helperDetach}; }; } else { _distClosestAttached = objNull; _distCheckAttached = 0; _distClosest = 10; _distClosestAttachedFoundPos = []; @@ -151,11 +151,11 @@ fnc_snapDistanceCheck = { _objectHelper setPosATL _distClosestPointFoundPos; }; _objectHelper setDir _distClosestPointFoundDir; - waitUntil {sleep 0.1; !helperDetach}; + waitUntil {uiSleep 0.1; !helperDetach}; }; }; }; - sleep 0.1; + uiSleep 0.1; }; }; @@ -183,7 +183,7 @@ fnc_initSnapTutorial = { //Delete on init 800 cutRsc ["Default", "PLAIN"]; - sleep 0.1; + uiSleep 0.1; //Init Tutorial text if (_bldTxtEnable) then { @@ -232,7 +232,7 @@ switch (snapActionState) do { [] spawn { while {true} do { if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";}; - sleep 2; + uiSleep 2; }; }; }; @@ -242,7 +242,7 @@ switch (snapActionState) do { [1,1,0] call fnc_snapActionCleanup; call fnc_initSnapPoints; call fnc_initSnapPointsNearby; - sleep 0.25; + uiSleep 0.25; call fnc_snapDistanceCheck; }; diff --git a/SQF/dayz_code/actions/stopGenerator.sqf b/SQF/dayz_code/actions/stopGenerator.sqf index d34501d27..2f4cdf79c 100644 --- a/SQF/dayz_code/actions/stopGenerator.sqf +++ b/SQF/dayz_code/actions/stopGenerator.sqf @@ -36,7 +36,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/tame_dog.sqf b/SQF/dayz_code/actions/tame_dog.sqf index f7425788e..5f28d0773 100644 --- a/SQF/dayz_code/actions/tame_dog.sqf +++ b/SQF/dayz_code/actions/tame_dog.sqf @@ -43,7 +43,7 @@ if(_removed == _countIn) then { _animalID = _dog getVariable "fsm_handle"; _animalID setFSMVariable ["_isTamed", true]; - sleep 1; + uiSleep 1; //diag_log format["DEBUG: %1, id: %2 [%3]",_dog,_animalID,completedFSM _animalID]; if (!moveToCompleted _dog) then { _dog moveTo ([_dog] call FNC_GetPos); diff --git a/SQF/dayz_code/actions/tent_pitch.sqf b/SQF/dayz_code/actions/tent_pitch.sqf index 116d7e262..eed3c369b 100644 --- a/SQF/dayz_code/actions/tent_pitch.sqf +++ b/SQF/dayz_code/actions/tent_pitch.sqf @@ -41,7 +41,7 @@ if (!_isOk) then { [1,1] call dayz_HungerThirst; //wait a bit player playActionNow "Medic"; - sleep 1; + uiSleep 1; _dis=20; _sfx = "tentunpack"; @@ -50,7 +50,7 @@ if (!_isOk) then { _classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Pitch" >> "create"); - sleep 5; + uiSleep 5; //place tent (local) _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; _object setdir _dir; diff --git a/SQF/dayz_code/actions/tow_AttachStraps.sqf b/SQF/dayz_code/actions/tow_AttachStraps.sqf index f78951c95..f69e4b8a6 100644 --- a/SQF/dayz_code/actions/tow_AttachStraps.sqf +++ b/SQF/dayz_code/actions/tow_AttachStraps.sqf @@ -61,7 +61,7 @@ if(_IsNearVehicle >= 1) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/tow_DetachStraps.sqf b/SQF/dayz_code/actions/tow_DetachStraps.sqf index e61314fb6..7b0257c0c 100644 --- a/SQF/dayz_code/actions/tow_DetachStraps.sqf +++ b/SQF/dayz_code/actions/tow_DetachStraps.sqf @@ -50,7 +50,7 @@ if(_inTow) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_bicycle.sqf b/SQF/dayz_code/actions/trade_any_bicycle.sqf index 2cdf794d9..b57406fd6 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle.sqf @@ -50,7 +50,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_bicycle_old.sqf b/SQF/dayz_code/actions/trade_any_bicycle_old.sqf index b73b08c2b..63d817c27 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle_old.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle_old.sqf @@ -56,7 +56,7 @@ if (_qty >= _qty_in) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_boat.sqf b/SQF/dayz_code/actions/trade_any_boat.sqf index 4f4ea31d1..e8b7be2ec 100644 --- a/SQF/dayz_code/actions/trade_any_boat.sqf +++ b/SQF/dayz_code/actions/trade_any_boat.sqf @@ -50,7 +50,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_boat_old.sqf b/SQF/dayz_code/actions/trade_any_boat_old.sqf index 42c8d2c0f..e0a8953cc 100644 --- a/SQF/dayz_code/actions/trade_any_boat_old.sqf +++ b/SQF/dayz_code/actions/trade_any_boat_old.sqf @@ -57,7 +57,7 @@ if (_qty >= _qty_in) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_vehicle.sqf b/SQF/dayz_code/actions/trade_any_vehicle.sqf index ad52959e9..007905491 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle.sqf @@ -50,7 +50,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_vehicle_free.sqf b/SQF/dayz_code/actions/trade_any_vehicle_free.sqf index 9797625d8..781011ab8 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle_free.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle_free.sqf @@ -50,7 +50,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_any_vehicle_old.sqf b/SQF/dayz_code/actions/trade_any_vehicle_old.sqf index 7dd98c093..d78598b28 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle_old.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle_old.sqf @@ -61,7 +61,7 @@ if (_qty >= _qty_in) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_backpacks.sqf b/SQF/dayz_code/actions/trade_backpacks.sqf index aceaeb45e..ee2cf7601 100644 --- a/SQF/dayz_code/actions/trade_backpacks.sqf +++ b/SQF/dayz_code/actions/trade_backpacks.sqf @@ -47,7 +47,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_backpacks_old.sqf b/SQF/dayz_code/actions/trade_backpacks_old.sqf index e84c1db6e..af440fa22 100644 --- a/SQF/dayz_code/actions/trade_backpacks_old.sqf +++ b/SQF/dayz_code/actions/trade_backpacks_old.sqf @@ -55,7 +55,7 @@ if (_qty >= _qty_in) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_items.sqf b/SQF/dayz_code/actions/trade_items.sqf index 0815f385a..ac08c813f 100644 --- a/SQF/dayz_code/actions/trade_items.sqf +++ b/SQF/dayz_code/actions/trade_items.sqf @@ -88,7 +88,7 @@ while {r_autoTrade} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -144,7 +144,7 @@ while {r_autoTrade} do { }; if(_abort) exitWith {r_autoTrade = false}; - sleep 1; + uiSleep 1; }; DZE_ActionInProgress = false; diff --git a/SQF/dayz_code/actions/trade_items_old.sqf b/SQF/dayz_code/actions/trade_items_old.sqf index ae3c58d39..7a3131184 100644 --- a/SQF/dayz_code/actions/trade_items_old.sqf +++ b/SQF/dayz_code/actions/trade_items_old.sqf @@ -78,7 +78,7 @@ for "_x" from 1 to _total_trades do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -144,7 +144,7 @@ for "_x" from 1 to _total_trades do { }; }; - sleep 1; + uiSleep 1; if(_abort) exitWith {}; }; diff --git a/SQF/dayz_code/actions/trade_items_wo_db.sqf b/SQF/dayz_code/actions/trade_items_wo_db.sqf index 2ba3f85ad..12e64467f 100644 --- a/SQF/dayz_code/actions/trade_items_wo_db.sqf +++ b/SQF/dayz_code/actions/trade_items_wo_db.sqf @@ -63,7 +63,7 @@ for "_x" from 1 to _total_trades do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; @@ -113,7 +113,7 @@ for "_x" from 1 to _total_trades do { cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; }; - sleep 1; + uiSleep 1; if(_abort) exitWith {}; }; diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf index b81feea20..447343590 100644 --- a/SQF/dayz_code/actions/trade_weapons.sqf +++ b/SQF/dayz_code/actions/trade_weapons.sqf @@ -98,7 +98,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/trade_weapons_old.sqf b/SQF/dayz_code/actions/trade_weapons_old.sqf index ea232f252..e86b4c487 100644 --- a/SQF/dayz_code/actions/trade_weapons_old.sqf +++ b/SQF/dayz_code/actions/trade_weapons_old.sqf @@ -56,7 +56,7 @@ if (_qty >= _qty_in) then { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/unpack.sqf b/SQF/dayz_code/actions/unpack.sqf index 7b55fa791..63bb7a4ff 100644 --- a/SQF/dayz_code/actions/unpack.sqf +++ b/SQF/dayz_code/actions/unpack.sqf @@ -6,7 +6,7 @@ _dir = getDir player; _classname = _array select 0; removeBackpack player; player playActionNow "Medic"; -sleep 8; +uiSleep 8; player removeAction r_player_action_bag; r_action_bag = false; _weapon = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; diff --git a/SQF/dayz_code/actions/vault_pitch.sqf b/SQF/dayz_code/actions/vault_pitch.sqf index 1ed8a6174..712c7ff04 100644 --- a/SQF/dayz_code/actions/vault_pitch.sqf +++ b/SQF/dayz_code/actions/vault_pitch.sqf @@ -53,16 +53,16 @@ while {_isOk} do { if(_counter == 0) then { cutText [(localize "str_epoch_player_109"), "PLAIN DOWN"]; - sleep 5; + uiSleep 5; _location1 = getPosATL player; - sleep 5; + uiSleep 5; _location2 = getPosATL player; if(_location1 distance _location2 < 0.1) exitWith { cutText [(localize "str_epoch_player_109"), "PLAIN DOWN"]; _location3 = getPosATL player; - sleep 5; + uiSleep 5; _location4 = getPosATL player; if(_location3 distance _location4 > 0.1) exitWith { @@ -123,7 +123,7 @@ if(!_cancel) then { [1,1] call dayz_HungerThirst; //wait a bit player playActionNow "Medic"; - sleep 1; + uiSleep 1; [player,"tentunpack",0,false] call dayz_zombieSpeak; [player,50,true,(getPosATL player)] spawn player_alertZombies; @@ -140,7 +140,7 @@ if(!_cancel) then { _location = player modelToWorld [_offset_x,_offset_y,_offset_z]; }; - sleep 5; + uiSleep 5; //place tent (local) _tent = createVehicle ["VaultStorageLocked", _location, [], 0, "CAN_COLLIDE"]; _tent setdir _dir; diff --git a/SQF/dayz_code/actions/veh_seatActions.sqf b/SQF/dayz_code/actions/veh_seatActions.sqf index cb059f46b..a188a68f7 100644 --- a/SQF/dayz_code/actions/veh_seatActions.sqf +++ b/SQF/dayz_code/actions/veh_seatActions.sqf @@ -16,7 +16,7 @@ switch _action do { case "MoveToPilot": { if (((_vehicle emptyPositions "Driver") == 0) && (!alive _driver)) then { _driver action ["EJECT", _vehicle]; - sleep 0.5; //wait for ejection + uiSleep 0.5; //wait for ejection }; if ((_vehicle emptyPositions "Driver") > 0) then { player action [_action, _vehicle]; diff --git a/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf b/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf index f0d753b23..88567ef43 100644 --- a/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf +++ b/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf @@ -1,5 +1,5 @@ scriptName "modules_e\Functions\objects\fn_HALO.sqf"; -sleep 0.01; +uiSleep 0.01; //--- HALO ------------------------------------------------------------------------------------------------------------------------------------- if (typename _this == typename objnull) then { @@ -165,7 +165,7 @@ if (typename _this == typename objnull) then { bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.02,0.02,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef]; bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01; */ - sleep 0.01; + uiSleep 0.01; }; //--- End player removeaction bis_fnc_halo_action; @@ -207,7 +207,7 @@ if (typename _this == typename objnull) then { (_vel select 2) ]; }; - sleep 0.01; + uiSleep 0.01; }; //--- Open @@ -334,7 +334,7 @@ if (typename _this == typename []) then { bis_fnc_halo_para_mousemoving_eh = (finddisplay 46) displayaddeventhandler ["mousemoving","_this call bis_fnc_halo_para_loop;"]; bis_fnc_halo_para_mouseholding_eh = (finddisplay 46) displayaddeventhandler ["mouseholding","_this call bis_fnc_halo_para_loop;"]; - sleep 4; + uiSleep 4; // ppeffectdestroy bis_fnc_halo_DynamicBlur; bis_fnc_halo_para_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_para_keydown;"]; diff --git a/SQF/dayz_code/compile/fn_lightFunctions.sqf b/SQF/dayz_code/compile/fn_lightFunctions.sqf index 08a34744a..5d4156862 100644 --- a/SQF/dayz_code/compile/fn_lightFunctions.sqf +++ b/SQF/dayz_code/compile/fn_lightFunctions.sqf @@ -100,7 +100,7 @@ _nrTLs= _twrPos nearObjects ["#lightpoint",20]; }else{ deleteVehicle _x; }; - sleep .2; + uiSleep 0.2; }count _nrTLs; }else{ @@ -112,7 +112,7 @@ _nrTLs= _twrPos nearObjects ["#lightpoint",20]; _a = (_twrPos select 0)+(_rad * cos(_ang)); _b = (_twrPos select 1)+(_rad * sin(_ang)); [_lCol,_lbrt,_lamb,[_a,_b,(_twrPos select 2) + 26],_ang,[0,0,-1]] call axe_newLightPoint; - sleep .4; + uiSleep 0.4; }; }; }; diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf index 4a75c92f7..2eae7725b 100644 --- a/SQF/dayz_code/compile/fn_unconscious.sqf +++ b/SQF/dayz_code/compile/fn_unconscious.sqf @@ -18,12 +18,12 @@ if ((!r_player_handler1) && (r_handlerCount == 0)) then { "colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1], [1, 1, 1, 0.0]];"colorCorrections" ppEffectCommit 0; 0 fadeSound 0.05; disableUserInput true; - _disableHdlr = [] spawn { sleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; }; + _disableHdlr = [] spawn { uiSleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; }; while {r_player_unconscious} do { _ctrl1 ctrlSetPosition [(_ctrl1Pos select 0),(_ctrl1Pos select 1),(_ctrl1Pos select 2),((0.136829 * safezoneH) * (1 -(r_player_timeout / _totalTimeout)))]; _ctrl1 ctrlCommit 1; playSound "heartbeat_1"; - sleep 1; + uiSleep 1; _bloodLow = ((r_player_blood/r_player_bloodTotal) < 0.5); if(_timeout == 0) then { diff --git a/SQF/dayz_code/compile/local_gutObject.sqf b/SQF/dayz_code/compile/local_gutObject.sqf index 8299b12d6..375e32102 100644 --- a/SQF/dayz_code/compile/local_gutObject.sqf +++ b/SQF/dayz_code/compile/local_gutObject.sqf @@ -15,7 +15,7 @@ if (local _animalbody) then { _body = _this select 1; _pos = getPosATL _body; while {(count magazines _body >0) && (time - _timer < 300) } do { - sleep 5; + uiSleep 5; }; hideBody _body; @@ -30,7 +30,7 @@ if (local _animalbody) then { }; } count _inRange; - sleep 5; + uiSleep 5; deleteVehicle _body; true; }; diff --git a/SQF/dayz_code/compile/local_gutObjectZ.sqf b/SQF/dayz_code/compile/local_gutObjectZ.sqf index b15132983..26715c1c7 100644 --- a/SQF/dayz_code/compile/local_gutObjectZ.sqf +++ b/SQF/dayz_code/compile/local_gutObjectZ.sqf @@ -11,7 +11,7 @@ if (local _zombiebody) then { _body = _this select 1; _pos = getPosATL _body; while {(count magazines _body >0) && (time - _timer < 300) } do { - sleep 5; + uiSleep 5; }; hideBody _body; @@ -25,7 +25,7 @@ if (local _zombiebody) then { }; } count _inRange; - sleep 5; + uiSleep 5; deleteVehicle _body; true; }; diff --git a/SQF/dayz_code/compile/local_lights_house.sqf b/SQF/dayz_code/compile/local_lights_house.sqf index 30fd51648..69049e51f 100644 --- a/SQF/dayz_code/compile/local_lights_house.sqf +++ b/SQF/dayz_code/compile/local_lights_house.sqf @@ -95,7 +95,7 @@ if(!isNil "_objHouse")then{ }; _brtns = [_plyr,_x] call axe_lightBrightness; - while{true}do{sleep .1;if (_x animationPhase "Lights_1"==1) exitWith {};}; + while{true}do{uiSleep 0.1;if (_x animationPhase "Lights_1"==1) exitWith {};}; //axeDiagLog = format["HL:NEW HOUSE LIT:%1",_x]; //publicVariable "axeDiagLog"; diff --git a/SQF/dayz_code/compile/local_lights_init.sqf b/SQF/dayz_code/compile/local_lights_init.sqf index 424b146c0..9a9a1c4d2 100644 --- a/SQF/dayz_code/compile/local_lights_init.sqf +++ b/SQF/dayz_code/compile/local_lights_init.sqf @@ -103,7 +103,7 @@ if(!isDedicated)then{ //}; _plyPos = [Player] call FNC_getPos; }; - sleep _slpTime; + uiSleep _slpTime; }; }; //Attempt a server cleanup - Not detectable.. @@ -121,7 +121,7 @@ if(isServer)then{ { if (local _x) then { _x call dayz_perform_purge; - sleep 0.025; + uiSleep 0.025; _delQtyLights = _delQtyLights + 1; } else { if (!alive _x) then { @@ -130,13 +130,13 @@ if(isServer)then{ _nearby = {(isPlayer _x) && (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 420]);//Use calculated range here. if (_nearby==0) then { _x call dayz_perform_purge; - sleep 0.025; + uiSleep 0.025; _delQtyLights = _delQtyLights + 1; }; }; }; }; - sleep 0.001; + uiSleep 0.001; } forEach _missonLights; if (_delQtyLights > 0) then { _qty = count _missonLights; @@ -147,7 +147,7 @@ if(isServer)then{ while{true}do{ [] spawn server_spawnCleanLightpoints; - sleep 30; + uiSleep 30; }; }; */ diff --git a/SQF/dayz_code/compile/local_lights_off.sqf b/SQF/dayz_code/compile/local_lights_off.sqf index bdcbdd187..9c66ad236 100644 --- a/SQF/dayz_code/compile/local_lights_off.sqf +++ b/SQF/dayz_code/compile/local_lights_off.sqf @@ -31,7 +31,7 @@ _objHouses = nearestObjects [_nrstTrig, ["House"], _hsRange]; _objHouse animate ["Lights_1",1]; }; _sleeptime=(random 100)/100; - sleep _sleeptime; + uiSleep _sleeptime; }; if(_hasLight)then{deleteVehicle _animlightpoint;}; _objHouse animate ["Lights_1",0]; diff --git a/SQF/dayz_code/compile/object_monitorGear.sqf b/SQF/dayz_code/compile/object_monitorGear.sqf index a7ae4fb12..fc1e235f9 100644 --- a/SQF/dayz_code/compile/object_monitorGear.sqf +++ b/SQF/dayz_code/compile/object_monitorGear.sqf @@ -83,7 +83,7 @@ if ((_isVehicle || _isStorage || _isnewstorage) && (!_isMan) && (!(isNull (findD _freeSlots = [] call _countFreeSlots; [] call _setControlText; - sleep 0.01; + uiSleep 0.01; }; }; }; diff --git a/SQF/dayz_code/compile/object_roadFlare.sqf b/SQF/dayz_code/compile/object_roadFlare.sqf index 15b418342..8ab051705 100644 --- a/SQF/dayz_code/compile/object_roadFlare.sqf +++ b/SQF/dayz_code/compile/object_roadFlare.sqf @@ -23,7 +23,7 @@ if (!isNull _flare) then { while {alive _flare} do { _lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01]; //_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005]; - sleep (random 0.1); + uiSleep (random 0.1); }; deleteVehicle _lightArea; deleteVehicle _lightSpark; diff --git a/SQF/dayz_code/compile/player_animalCheck.sqf b/SQF/dayz_code/compile/player_animalCheck.sqf index 29819ab18..70ab786f8 100644 --- a/SQF/dayz_code/compile/player_animalCheck.sqf +++ b/SQF/dayz_code/compile/player_animalCheck.sqf @@ -35,11 +35,11 @@ if ((count _list) < dayz_maxAnimals) then { if (((player distance _Pos) < dayz_animalDistance) && {!(surfaceIsWater _Pos)} && {(count _list) <= 1}) then { if (_type == "DZ_Pastor") then { _agent = createAgent [_type, _Pos, [], 0, "NONE"]; } else { _agent = createAgent [_type, _Pos, [], 0, "FORM"]; }; - sleep 0.001; + uiSleep 0.001; _agent setPos _Pos; _id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm"; PVDZE_zed_Spawn = [_agent]; publicVariableServer "PVDZE_zed_Spawn"; }; - sleep 1; + uiSleep 1; }; diff --git a/SQF/dayz_code/compile/player_checkStealth.sqf b/SQF/dayz_code/compile/player_checkStealth.sqf index 831d63448..37491ebfd 100644 --- a/SQF/dayz_code/compile/player_checkStealth.sqf +++ b/SQF/dayz_code/compile/player_checkStealth.sqf @@ -45,7 +45,7 @@ if (_anim4 == "aswm") then { player playActionNow "stop"; }; // This sleep was much needed - sleep 5; + uiSleep 5; dayz_isSwimming = false; }; diff --git a/SQF/dayz_code/compile/player_crossbowBolt.sqf b/SQF/dayz_code/compile/player_crossbowBolt.sqf index cfda02cb2..c66dfde84 100644 --- a/SQF/dayz_code/compile/player_crossbowBolt.sqf +++ b/SQF/dayz_code/compile/player_crossbowBolt.sqf @@ -21,7 +21,7 @@ if (_magazine == "Quiver") then { while {alive _projectile} do { _endPos = getPosATL _projectile; _vUp = vectorUp _projectile; - sleep 0.01; + uiSleep 0.01; }; _distance = _unit distance _endPos; @@ -41,7 +41,7 @@ if (_height < 100) then { if (count _hitArray > 0) then {_doLoop = false}; if (_countr > 50) then {_doLoop = false}; _countr = _countr + 1; - sleep 0.1; + uiSleep 0.1; }; if (count _hitArray > 0) then { diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index d6046fbcd..a960009d3 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -29,7 +29,7 @@ publicVariableServer "PVDZE_plr_Died"; _id = [player,20,true,getPosATL player] call player_alertZombies; -sleep 0.5; +uiSleep 0.5; player setDamage 1; 0.1 fadeSound 0; @@ -85,7 +85,7 @@ r_player_dead = true; //Player is Dead! 3 fadeSound 0; -sleep 1; +uiSleep 1; dayz_originalPlayer enableSimulation true; @@ -103,7 +103,7 @@ selectPlayer dayz_originalPlayer; _body setVariable["combattimeout", 0, true]; //["dayzFlies",player] call broadcastRpcCallAll; -sleep 2; +uiSleep 2; 1 cutRsc ["DeathScreen","BLACK OUT",3]; @@ -112,11 +112,11 @@ playMusic "dayz_track_death_1"; "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5; "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5; -sleep 2; +uiSleep 2; for "_x" from 5 to 1 step -1 do { titleText [format[localize "str_return_lobby", _x], "PLAIN DOWN", 1]; - sleep 1; + uiSleep 1; }; PVDZE_Server_Simulation = [_body, false]; diff --git a/SQF/dayz_code/compile/player_humanityChange.sqf b/SQF/dayz_code/compile/player_humanityChange.sqf index 1d908c39f..ce47d050d 100644 --- a/SQF/dayz_code/compile/player_humanityChange.sqf +++ b/SQF/dayz_code/compile/player_humanityChange.sqf @@ -15,7 +15,7 @@ if (_object == player) then { }; player setVariable ["freeTarget",true,true]; //_timeStart = time; - sleep _wait; + uiSleep _wait; player setVariable ["freeTarget",false,true]; } else { diff --git a/SQF/dayz_code/compile/player_humanityMorph.sqf b/SQF/dayz_code/compile/player_humanityMorph.sqf index f90d8b00c..cc0469b4f 100644 --- a/SQF/dayz_code/compile/player_humanityMorph.sqf +++ b/SQF/dayz_code/compile/player_humanityMorph.sqf @@ -99,7 +99,7 @@ player addWeapon "Flare"; call dayz_meleeMagazineCheck; }; -sleep 0.1; +uiSleep 0.1; if (!isNull _old) then { // this should not be needed as player is deleted in player_switchModel? diff --git a/SQF/dayz_code/compile/player_lockVault.sqf b/SQF/dayz_code/compile/player_lockVault.sqf index 2408995d1..b5e3941f1 100644 --- a/SQF/dayz_code/compile/player_lockVault.sqf +++ b/SQF/dayz_code/compile/player_lockVault.sqf @@ -21,9 +21,9 @@ _text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName"); if(isNull _obj) exitWith { DZE_ActionInProgress = false; }; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; -sleep 1; +uiSleep 1; [player,"tentpack",0,false] call dayz_zombieSpeak; -sleep 5; +uiSleep 5; _playerNear = _obj call dze_isnearest_player; if(_playerNear) exitWith { DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_11") , "PLAIN DOWN"]; }; diff --git a/SQF/dayz_code/compile/player_music.sqf b/SQF/dayz_code/compile/player_music.sqf index 030b233c5..4e8812634 100644 --- a/SQF/dayz_code/compile/player_music.sqf +++ b/SQF/dayz_code/compile/player_music.sqf @@ -7,5 +7,5 @@ while {!r_player_dead} do { if (!r_player_unconscious && !r_pitchWhine) then { playMusic _sound; }; - sleep _pause; + uiSleep _pause; }; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_onPause.sqf b/SQF/dayz_code/compile/player_onPause.sqf index 887beafb6..076a1970e 100644 --- a/SQF/dayz_code/compile/player_onPause.sqf +++ b/SQF/dayz_code/compile/player_onPause.sqf @@ -55,7 +55,7 @@ while {!isNull _display} do { _sleep = 1; }; }; - sleep _sleep; + uiSleep _sleep; _timeOut = diag_tickTime; }; cutText ["", "PLAIN DOWN"]; diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index 3592ecc7f..0667da236 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -37,7 +37,7 @@ _sfx = "tentpack"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; -sleep 3; +uiSleep 3; _classname = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "create"); diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf index 4df74db81..0cd8e48e6 100644 --- a/SQF/dayz_code/compile/player_packVault.sqf +++ b/SQF/dayz_code/compile/player_packVault.sqf @@ -38,9 +38,9 @@ if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; s_player_packv _obj setVariable["packing",1]; cutText [format[(localize "str_epoch_player_121"),_text], "PLAIN DOWN"]; -sleep 1; +uiSleep 1; _location1 = getPosATL player; -sleep 5; +uiSleep 5; _location2 = getPosATL player; if(_location1 distance _location2 > 0.1) exitWith { @@ -59,7 +59,7 @@ if(!isNull _obj && alive _obj) then { [1,1] call dayz_HungerThirst; player playActionNow "Medic"; [player,"tentpack",0,false] call dayz_zombieSpeak; - sleep 3; + uiSleep 3; _weapons = getWeaponCargo _obj; _magazines = getMagazineCargo _obj; diff --git a/SQF/dayz_code/compile/player_projectileNear.sqf b/SQF/dayz_code/compile/player_projectileNear.sqf index 1bbe65946..079ad6504 100644 --- a/SQF/dayz_code/compile/player_projectileNear.sqf +++ b/SQF/dayz_code/compile/player_projectileNear.sqf @@ -17,7 +17,7 @@ while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do { _projectilespeed = Speed _projectile; _projectflight = (((_projectilespeed / 60) * 1000)); if (_projectflight > 0) then { - sleep (12 / (_projectflight)); + uiSleep (12 / (_projectflight)); }; if (alive _projectile && !(isNull _projectile)) then {_currentNear = ([_projectile] call FNC_GetPos) nearEntities [["CAManBase","AllVehicles"],15];}; _listNear = _listNear + _currentNear; diff --git a/SQF/dayz_code/compile/player_switchModel.sqf b/SQF/dayz_code/compile/player_switchModel.sqf index b0ae4d3b6..6498d9338 100644 --- a/SQF/dayz_code/compile/player_switchModel.sqf +++ b/SQF/dayz_code/compile/player_switchModel.sqf @@ -129,9 +129,9 @@ if (!isNil "_newBackpackType") then { _backpackWpnQtys = _backpackWpn select 1; }; [] call _switchUnit; - if (gear_done) then {sleep 0.001;}; + if (gear_done) then {uiSleep 0.001;}; ["1"] call gearDialog_create; - if (gear_done) then {sleep 0.001;}; + if (gear_done) then {uiSleep 0.001;}; //magazines _countr = 0; { @@ -152,7 +152,7 @@ if (!isNil "_newBackpackType") then { }; } count _backpackMag; (findDisplay 106) closeDisplay 0; - if (gear_done) then {sleep 0.001; disableUserInput false;}; + if (gear_done) then {uiSleep 0.001; disableUserInput false;}; _countr = 0; { (unitBackpack player) addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)]; diff --git a/SQF/dayz_code/compile/player_throwObject.sqf b/SQF/dayz_code/compile/player_throwObject.sqf index 527e2e632..6a8e34984 100644 --- a/SQF/dayz_code/compile/player_throwObject.sqf +++ b/SQF/dayz_code/compile/player_throwObject.sqf @@ -14,7 +14,7 @@ while {_doWait} do { if (!(alive _projectile)) then {_doWait = false}; if (_vel < 0.1) then {_doWait = false}; _endPos = getPosATL _projectile; - sleep 0.01; + uiSleep 0.01; }; _distance = parseNumber format["%1",(getArray (configFile >> "CfgAmmo" >> _ammo >> "soundHit") select 3)]; diff --git a/SQF/dayz_code/compile/player_traderMenuConfig.sqf b/SQF/dayz_code/compile/player_traderMenuConfig.sqf index b36e6cacd..837bb240b 100644 --- a/SQF/dayz_code/compile/player_traderMenuConfig.sqf +++ b/SQF/dayz_code/compile/player_traderMenuConfig.sqf @@ -183,7 +183,7 @@ TraderDialogShowPrices = { private ["_index", "_item"]; _index = _this select 0; if (_index < 0) exitWith {}; - while {count TraderItemList < 1} do { sleep 1; }; + while {count TraderItemList < 1} do { uiSleep 1; }; _item = TraderItemList select _index; _qty = {_x == (_item select 3)} count magazines player; diff --git a/SQF/dayz_code/compile/player_traderMenuHive.sqf b/SQF/dayz_code/compile/player_traderMenuHive.sqf index 973133bfe..0aaeeb297 100644 --- a/SQF/dayz_code/compile/player_traderMenuHive.sqf +++ b/SQF/dayz_code/compile/player_traderMenuHive.sqf @@ -171,7 +171,7 @@ TraderDialogShowPrices = { private ["_index", "_item"]; _index = _this select 0; if (_index < 0) exitWith {}; - while {count TraderItemList < 1} do { sleep 1; }; + while {count TraderItemList < 1} do { uiSleep 1; }; _item = TraderItemList select _index; _qty = {_x == (_item select 3)} count magazines player; diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf index 2c30ada89..680fb84df 100644 --- a/SQF/dayz_code/compile/player_unlockVault.sqf +++ b/SQF/dayz_code/compile/player_unlockVault.sqf @@ -67,9 +67,9 @@ if ((_ownerID == dayz_combination) || (_ownerID == dayz_playerUID)) then { _magazines = _obj getVariable["MagazineCargo",[]]; _backpacks = _obj getVariable["BackpackCargo",[]]; player playActionNow "Medic"; - sleep 1; + uiSleep 1; [player,"tentpack",0,false] call dayz_zombieSpeak; - sleep 5; + uiSleep 5; _holder = createVehicle [_unlockedClass,_pos,[], 0, "CAN_COLLIDE"]; // Remove locked vault @@ -128,10 +128,10 @@ if ((_ownerID == dayz_combination) || (_ownerID == dayz_playerUID)) then { } else { [10,10] call dayz_HungerThirst; player playActionNow "Medic"; - sleep 1; + uiSleep 1; [player,"repair",0,false] call dayz_zombieSpeak; [player,25,true,(getPosATL player)] spawn player_alertZombies; - sleep 5; + uiSleep 5; cutText [format[(localize "str_epoch_player_126"),_text], "PLAIN DOWN"]; }; s_player_unlockvault = -1; diff --git a/SQF/dayz_code/compile/player_zombieAttack.sqf b/SQF/dayz_code/compile/player_zombieAttack.sqf index 0df925128..01621c3bd 100644 --- a/SQF/dayz_code/compile/player_zombieAttack.sqf +++ b/SQF/dayz_code/compile/player_zombieAttack.sqf @@ -41,7 +41,7 @@ if (local _unit) then { }; //Wait -sleep 0.3; +uiSleep 0.3; if (_vehicle != player) then { _hpList = _vehicle call vehicle_getHitpoints; diff --git a/SQF/dayz_code/compile/tame_dog.sqf b/SQF/dayz_code/compile/tame_dog.sqf index a8af20e27..5ba27557d 100644 --- a/SQF/dayz_code/compile/tame_dog.sqf +++ b/SQF/dayz_code/compile/tame_dog.sqf @@ -22,7 +22,7 @@ _dog = _this select 3; player removeMagazine "FoodSteakRaw"; _animalID = _dog getVariable "fsm_handle"; _animalID setFSMVariable ["_isTamed", true]; -sleep 1; +uiSleep 1; // diag_log format["DEBUG: %1, id: %2 [%3]",_dog,_animalID,completedFSM _animalID]; if (!moveToCompleted _dog) then { _dog moveTo ([_dog] call FNC_GetPos); diff --git a/SQF/dayz_code/compile/zombie_generate.sqf b/SQF/dayz_code/compile/zombie_generate.sqf index 467c5373d..6a33c69f5 100644 --- a/SQF/dayz_code/compile/zombie_generate.sqf +++ b/SQF/dayz_code/compile/zombie_generate.sqf @@ -76,7 +76,7 @@ if ((dayz_spawnZombies < _maxControlledZombies) && (dayz_CurrentNearByZombies < if (surfaceIsWater _position) exitwith { }; _agent = createAgent [_type, _position, [], _radius, _method]; - sleep 0.001; + uiSleep 0.001; //add to global counter dayz_spawnZombies = dayz_spawnZombies + 1; @@ -122,15 +122,15 @@ if ((dayz_spawnZombies < _maxControlledZombies) && (dayz_CurrentNearByZombies < _agtPos = getPosASL _agent; _agtPos set [2, -3]; _agent setPosASL _agtPos; - sleep 0.001; + uiSleep 0.001; _agtPos = +(_position); _agtPos set [2, -3]; _agent setPosASL _agtPos; - sleep 0.001; + uiSleep 0.001; */ _agent setDir random 360; //_agent setPosATL _position; - sleep 0.001; + uiSleep 0.001; _position = getPosATL _agent; diff --git a/SQF/dayz_code/external/DynamicWeatherEffects.sqf b/SQF/dayz_code/external/DynamicWeatherEffects.sqf index 77d766582..0d0d04a8d 100644 --- a/SQF/dayz_code/external/DynamicWeatherEffects.sqf +++ b/SQF/dayz_code/external/DynamicWeatherEffects.sqf @@ -278,7 +278,7 @@ if (isServer) then { setWind [drn_DynamicWeather_WindX, drn_DynamicWeather_WindZ, true]; - sleep 0.05; + uiSleep 0.05; publicVariable "drn_var_DynamicWeather_Rain"; drn_var_DynamicWeather_ServerInitialized = true; @@ -308,7 +308,7 @@ if (isServer) then { while {true} do { // Sleep a while until next weather change - sleep floor (_minTimeBetweenWeatherChangesMin * 60 + random ((_maxTimeBetweenWeatherChangesMin - _minTimeBetweenWeatherChangesMin) * 60)); + uiSleep floor (_minTimeBetweenWeatherChangesMin * 60 + random ((_maxTimeBetweenWeatherChangesMin - _minTimeBetweenWeatherChangesMin) * 60)); if (_minimumFog == _maximumFog && _minimumOvercast != _maximumOvercast) then { _weatherType = "OVERCAST"; @@ -435,7 +435,7 @@ if (isServer) then { call drn_fnc_DynamicWeather_SetWeatherAllClients; - sleep _weatherChangeTimeSek; + uiSleep _weatherChangeTimeSek; }; }; @@ -506,10 +506,10 @@ if (isServer) then { }; if (_debug) then { - sleep 1; + uiSleep 1; } else { - sleep 10; + uiSleep 10; }; }; }; @@ -538,7 +538,7 @@ if (isServer) then { }; 0 setRain _rain; - sleep 0.1; + uiSleep 0.1; while {true} do { if (_rainIntervalRainProbability > 0) then { @@ -557,7 +557,7 @@ if (isServer) then { 3 setRain _rain; - sleep 3; + uiSleep 3; }; }; diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Tired/R3F_DoTired.sqf b/SQF/dayz_code/external/R3F_Realism/R3F_Tired/R3F_DoTired.sqf index ae39d2ea3..68d2b0e60 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Tired/R3F_DoTired.sqf +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Tired/R3F_DoTired.sqf @@ -25,7 +25,7 @@ _s call FNC_PrintToRPT; R3F_TIRED_Accumulator = 0; R3F_TIRED_vitesse_de_mon_joueur = 0; -sleep 1; +uiSleep 1; _level = 1; while {true} do { @@ -123,7 +123,7 @@ while {true} do { R3F_TIRED_Counter_Time = 0; }; - sleep 1; + uiSleep 1; _n = _n + 1; }; diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf index 4042e2f43..068e8e9ec 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/R3F_DoWeight.sqf @@ -22,7 +22,7 @@ _initial_text = ""; _n = 0; while {true} do { - sleep R3F_WEIGHT_SHORT_DELAY; + uiSleep R3F_WEIGHT_SHORT_DELAY; #ifdef R3F_WEIGHT_SHOW_WEIGHT _display = findDisplay ARMA2_RSCDISPLAYGEARBOX; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index a0d96f3e7..e2177b91b 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -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; }; }; diff --git a/SQF/dayz_code/init/object_pickupAction.sqf b/SQF/dayz_code/init/object_pickupAction.sqf index 34c760bb0..7c23cc88c 100644 --- a/SQF/dayz_code/init/object_pickupAction.sqf +++ b/SQF/dayz_code/init/object_pickupAction.sqf @@ -50,7 +50,7 @@ actionMonitor = { _timeout = 0; _run = false; }; - sleep _timeout; + uiSleep _timeout; }; }; diff --git a/SQF/dayz_code/medical/bandage.sqf b/SQF/dayz_code/medical/bandage.sqf index 9036acd8b..eeb4046be 100644 --- a/SQF/dayz_code/medical/bandage.sqf +++ b/SQF/dayz_code/medical/bandage.sqf @@ -36,11 +36,11 @@ while {r_doLoop} do { r_doLoop = false; }; if (vehicle player != player) then { - sleep 3; + uiSleep 3; r_doLoop = false; _finished = true; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/medical/carry.sqf b/SQF/dayz_code/medical/carry.sqf index 5ee717bf7..d40eb835e 100644 --- a/SQF/dayz_code/medical/carry.sqf +++ b/SQF/dayz_code/medical/carry.sqf @@ -18,7 +18,7 @@ _unit removeAction Norrn_carryAction; if (isNull _dragee) exitWith {}; _dragee setVariable ["NORRN_unit_dragged", true, true]; detach _dragee; -sleep 1.5; +uiSleep 1.5; // public EH //DayZ CE: PublicVariables are removed in DayZ CE -> Could we also do here - Commit by Skaronator norrnRACarUp = _dragee; @@ -27,7 +27,7 @@ _dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up"; norrnRAPicUp = _unit; publicVariable "norrnRAPicUp"; _unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon"; -sleep 10; +uiSleep 10; _dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still"; _dragee attachto [_unit,[-0.2, 0.2, 0]]; @@ -51,6 +51,6 @@ while {r_carry_sqf} do _unit switchMove ""; r_carry_sqf = false; }; - sleep 0.1; + uiSleep 0.1; }; diff --git a/SQF/dayz_code/medical/carry_old.sqf b/SQF/dayz_code/medical/carry_old.sqf index 4c5ad10ef..25768b783 100644 --- a/SQF/dayz_code/medical/carry_old.sqf +++ b/SQF/dayz_code/medical/carry_old.sqf @@ -21,7 +21,7 @@ _unit removeAction Norrn_carryAction; if (isNull _dragee) exitWith {}; _dragee setVariable ["NORRN_unit_dragged", true, true]; detach _dragee; -sleep 1.5; +uiSleep 1.5; // public EH norrnRACarUp = _dragee; publicVariable "norrnRACarUp"; @@ -29,7 +29,7 @@ _dragee switchMove "ainjpfalmstpsnonwrfldnon_carried_up"; norrnRAPicUp = _unit; publicVariable "norrnRAPicUp"; _unit switchMove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon"; -sleep 10; +uiSleep 10; _dragee switchmove "ainjpfalmstpsnonwrfldnon_carried_still"; _dragee attachto [_unit,[-0.2, 0.2, 0]]; @@ -53,7 +53,7 @@ while {r_carry_sqf} do _unit switchMove ""; r_carry_sqf = false; }; - sleep 0.1; + uiSleep 0.1; }; _dragee playActionNow "Die"; diff --git a/SQF/dayz_code/medical/drag.sqf b/SQF/dayz_code/medical/drag.sqf index 81c3d19df..9c42bc6d5 100644 --- a/SQF/dayz_code/medical/drag.sqf +++ b/SQF/dayz_code/medical/drag.sqf @@ -20,7 +20,7 @@ if (!_unconscious) exitWith {}; //player assumes dragging posture _dragee setVariable ["NORRN_unit_dragged", true, true]; _unit playActionNow "grabDrag"; -sleep 2; +uiSleep 2; //unconscious unit assumes dragging posture //public EH @@ -28,7 +28,7 @@ sleep 2; norrnRaDrag = [_dragee]; publicVariable "norrnRaDrag"; _dragee attachto [_unit,[0.1, 1.01, 0]]; -sleep 0.02; +uiSleep 0.02; //rotate wounded units so that it is facing the correct direction norrnR180 = _dragee; @@ -41,4 +41,4 @@ call fnc_usec_medic_removeActions; NORRN_dropAction = player addAction ["Drop body", "\z\addons\dayz_code\medical\drop_body.sqf",_dragee, 0, false, true]; //NORRN_carryAction = player addAction ["Carry body", "\z\addons\dayz_code\medical\carry.sqf",_dragee, 0, false, true]; -sleep 1; +uiSleep 1; diff --git a/SQF/dayz_code/medical/epinephrine.sqf b/SQF/dayz_code/medical/epinephrine.sqf index 864c42913..06fb001f8 100644 --- a/SQF/dayz_code/medical/epinephrine.sqf +++ b/SQF/dayz_code/medical/epinephrine.sqf @@ -8,12 +8,12 @@ call fnc_usec_medic_removeActions; player playActionNow "Medic"; player removeMagazine "ItemEpinephrine"; -sleep 3; +uiSleep 3; if (!_isDead) then { _unit setVariable ["NORRN_unconscious", false, true]; _unit setVariable ["USEC_isCardiac",false,true]; - sleep 5; + uiSleep 5; /* PVS/PVC - Skaronator */ PVDZE_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]]; publicVariableServer "PVDZE_send"; diff --git a/SQF/dayz_code/medical/init_medical.sqf b/SQF/dayz_code/medical/init_medical.sqf index 5c03aac80..d318abfe9 100644 --- a/SQF/dayz_code/medical/init_medical.sqf +++ b/SQF/dayz_code/medical/init_medical.sqf @@ -48,7 +48,7 @@ while {true} do { //Handle player bleeding if ((r_player_injured) && (!r_player_handler)) then { r_player_handler = true; - sleep 1; + uiSleep 1; //localize "CLIENT: Start Player Bleeding"; [] spawn fnc_usec_playerBleed; //publicizes the blood value at regular intervals [] spawn fnc_med_publicBlood; @@ -57,7 +57,7 @@ while {true} do { //Handle player infection if ((r_player_infected) && (!r_player_handler)) then { r_player_handler = true; - sleep 1; + uiSleep 1; [] spawn fnc_med_publicBlood; }; @@ -71,17 +71,17 @@ while {true} do { 0 fadeSound ((r_player_blood/r_player_bloodTotal) + 0.5); "dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [4]; "dynamicBlur" ppEffectCommit 0.2; }; - sleep 0.5; + uiSleep 0.5; if (r_player_lowblood) then { "dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [1]; "dynamicBlur" ppEffectCommit 0.5; }; - sleep 0.5; + uiSleep 0.5; _lowBlood = player getVariable ["USEC_lowBlood", false]; if ((r_player_blood < r_player_bloodTotal) && !_lowBlood) then { player setVariable["USEC_lowBlood",true,true]; }; }; }; - sleep 1; + uiSleep 1; }; endLoadingScreen; \ No newline at end of file diff --git a/SQF/dayz_code/medical/load/load_act.sqf b/SQF/dayz_code/medical/load/load_act.sqf index 557903399..7119a0d30 100644 --- a/SQF/dayz_code/medical/load/load_act.sqf +++ b/SQF/dayz_code/medical/load/load_act.sqf @@ -19,7 +19,7 @@ if ((_vcl emptyPositions "cargo") > 0) then detach _wounded; _dragger switchMove ""; _wounded setVariable ["NORRN_LoadVcl", _vcl, true]; - sleep 1; + uiSleep 1; //["norrnRLact",_wounded] call broadcastRpcCallAll; norrnRLact = [_wounded]; publicVariable "norrnRLact"; diff --git a/SQF/dayz_code/medical/load/load_wounded.sqf b/SQF/dayz_code/medical/load/load_wounded.sqf index 237d0f5a6..e549ba054 100644 --- a/SQF/dayz_code/medical/load/load_wounded.sqf +++ b/SQF/dayz_code/medical/load/load_wounded.sqf @@ -7,13 +7,13 @@ _wounded = _this select 0; if (!local _wounded) exitWith {}; -sleep 1; +uiSleep 1; _vcl = _wounded getVariable "NORRN_loadVcl"; _wounded setVariable ["NORRN_unit_dragged", true, true]; _wounded assignAsCargo _vcl; _wounded moveInCargo _vcl; -sleep 1; +uiSleep 1; //["norrnRALW",_wounded] call broadcastRpcCallAll; norrnRALW = [_wounded]; publicVariable "norrnRALW"; @@ -29,15 +29,15 @@ if (local _wounded) then if (vehicle _wounded != _wounded) then { unassignVehicle _wounded; - sleep 0.05; + uiSleep 0.05; _wounded action ["EJECT", _vcl]; - sleep 1; + uiSleep 1; }; norrinRAlie = _wounded; publicVariable "norrinRAlie"; _wounded switchMove "ainjppnemstpsnonwrfldnon"; _wounded setVariable ["NORRN_unit_dragged", false, true]; - sleep 1; + uiSleep 1; }; }; @@ -46,4 +46,4 @@ if (local _wounded) then _wounded playMove "BasicDriver"; }; }; -sleep 0.01; \ No newline at end of file +uiSleep 0.01; \ No newline at end of file diff --git a/SQF/dayz_code/medical/load/unLoad_act.sqf b/SQF/dayz_code/medical/load/unLoad_act.sqf index 668be19b3..7486c5720 100644 --- a/SQF/dayz_code/medical/load/unLoad_act.sqf +++ b/SQF/dayz_code/medical/load/unLoad_act.sqf @@ -17,14 +17,14 @@ for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do if (_unit getVariable "NORRN_unconscious") then { unassignVehicle _unit; - sleep 0.05; + uiSleep 0.05; _unit action ["EJECT", _vcl]; - sleep 1; + uiSleep 1; _unit switchMove ""; _unit switchMove "ainjppnemstpsnonwrfldnon"; - sleep 0.2; + uiSleep 0.2; norrnRalie = _unit; publicVariable "norrnRalie"; }; - sleep 0.1; + uiSleep 0.1; }; \ No newline at end of file diff --git a/SQF/dayz_code/medical/morphine.sqf b/SQF/dayz_code/medical/morphine.sqf index 939c3d8c1..a52ac50d1 100644 --- a/SQF/dayz_code/medical/morphine.sqf +++ b/SQF/dayz_code/medical/morphine.sqf @@ -35,11 +35,11 @@ while {r_doLoop} do { r_doLoop = false; }; if (vehicle player != player) then { - sleep 3; + uiSleep 3; r_doLoop = false; _finished = true; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/medical/painkiller.sqf b/SQF/dayz_code/medical/painkiller.sqf index 28f09ba05..d35e2ff24 100644 --- a/SQF/dayz_code/medical/painkiller.sqf +++ b/SQF/dayz_code/medical/painkiller.sqf @@ -31,7 +31,7 @@ if(_num_removed == 1) then { [player,20] call player_humanityChange; }; - sleep 1; + uiSleep 1; //clear the healed player's vision /* PVS/PVC - Skaronator */ PVDZE_send = [_unit,"Painkiller",[_unit,player]]; diff --git a/SQF/dayz_code/medical/publicEH/noDamage.sqf b/SQF/dayz_code/medical/publicEH/noDamage.sqf index 06bbb15cb..f4a5b16e1 100644 --- a/SQF/dayz_code/medical/publicEH/noDamage.sqf +++ b/SQF/dayz_code/medical/publicEH/noDamage.sqf @@ -6,4 +6,4 @@ _unit = _this select 0; _unit setCaptive 3; _unit switchMove "AmovPpneMstpSnonWnonDnon_healed"; _unit allowDamage false; - sleep 0.01; \ No newline at end of file + uiSleep 0.01; \ No newline at end of file diff --git a/SQF/dayz_code/medical/pulse.sqf b/SQF/dayz_code/medical/pulse.sqf index 605941a9d..dd716c36d 100644 --- a/SQF/dayz_code/medical/pulse.sqf +++ b/SQF/dayz_code/medical/pulse.sqf @@ -5,7 +5,7 @@ _unit = (_this select 3); _isDead = _unit getVariable["USEC_isDead",false]; _isCardiac = _unit getVariable["USEC_isCardiac",false]; -sleep 1; +uiSleep 1; if (_isDead) then { TitleText[(localize "str_epoch_player_3"),"PLAIN DOWN",3]; } else { diff --git a/SQF/dayz_code/medical/self_transfusion.sqf b/SQF/dayz_code/medical/self_transfusion.sqf index 953a9ff33..46887adea 100644 --- a/SQF/dayz_code/medical/self_transfusion.sqf +++ b/SQF/dayz_code/medical/self_transfusion.sqf @@ -31,11 +31,11 @@ while {r_doLoop} do { r_doLoop = false; }; if (vehicle player != player) then { - sleep 6; + uiSleep 6; r_doLoop = false; _finished = true; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/medical/setup_functions_med.sqf b/SQF/dayz_code/medical/setup_functions_med.sqf index 5c48d17a0..d353b9e42 100644 --- a/SQF/dayz_code/medical/setup_functions_med.sqf +++ b/SQF/dayz_code/medical/setup_functions_med.sqf @@ -29,7 +29,7 @@ fnc_usec_pitchWhine = { }; r_pitchWhine = true; [] spawn { - sleep 32; + uiSleep 32; r_pitchWhine = false; }; }; @@ -54,7 +54,7 @@ fnc_usec_damageUnconscious = { if (r_player_unconscious) then { _unit action ["eject", _veh]; waitUntil{((vehicle _this) != _this)}; - sleep 1; + uiSleep 1; _unit setVariable ["NORRN_unconscious", true, true]; _unit playActionNow "Die"; }; @@ -132,7 +132,7 @@ fnc_med_publicBlood = { while {(r_player_injured || r_player_infected) && r_player_blood > 0} do { player setVariable["USEC_BloodQty",r_player_blood,true]; player setVariable["medForceUpdate",true]; - sleep 5; + uiSleep 5; }; }; @@ -166,7 +166,7 @@ fnc_usec_playerBleed = { {player setVariable[_x,false,true];} count USEC_woundHit; player setVariable ["USEC_injured",false,true]; }; - sleep 1; + uiSleep 1; }; }; @@ -226,14 +226,14 @@ fnc_usec_damageBleed = { _source setDropInterval 0.02; _point attachTo [_unit,_modelPos,_wound]; - sleep 5; + uiSleep 5; while {((_unit getVariable["USEC_injured",true]) && (alive _unit))} do { scopeName "loop"; if (vehicle _unit != _unit) then { BreakOut "loop"; }; - sleep 1; + uiSleep 1; }; deleteVehicle _source; deleteVehicle _point; @@ -257,7 +257,7 @@ fnc_usec_recoverUncons = { r_player_cardiac = false; r_player_handler1 = false; - sleep 1; + uiSleep 1; disableUserInput false; if (vehicle player == player) then { diff --git a/SQF/dayz_code/medical/transfusion.sqf b/SQF/dayz_code/medical/transfusion.sqf index 66681dbb1..0f863471d 100644 --- a/SQF/dayz_code/medical/transfusion.sqf +++ b/SQF/dayz_code/medical/transfusion.sqf @@ -36,7 +36,7 @@ while {r_doLoop} do { if (r_interrupt) then { r_doLoop = false; }; - sleep 0.1; + uiSleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf index ea290c564..722e7f3e4 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf @@ -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 diff --git a/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf b/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf index 4fef42c78..09104c6d6 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf @@ -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]; diff --git a/SQF/dayz_code/system/BIS_Effects/secondaries.sqf b/SQF/dayz_code/system/BIS_Effects/secondaries.sqf index 4cfd810e1..16cc1015b 100644 --- a/SQF/dayz_code/system/BIS_Effects/secondaries.sqf +++ b/SQF/dayz_code/system/BIS_Effects/secondaries.sqf @@ -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); \ No newline at end of file diff --git a/SQF/dayz_code/system/REsec.sqf b/SQF/dayz_code/system/REsec.sqf index 77d315a96..f5c07a317 100644 --- a/SQF/dayz_code/system/REsec.sqf +++ b/SQF/dayz_code/system/REsec.sqf @@ -55,7 +55,7 @@ private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"]; "remExFP" addPublicVariableEventHandler{_this call BIS_MPF_remoteExecutionServer}; BIS_PathMPscriptCommandsCustom=""; diag_log(__FILE__+":Monitoring Remote Exe..."); - sleep 1; + uiSleep 1; }; }; #endif \ No newline at end of file diff --git a/SQF/dayz_code/system/antihack.sqf b/SQF/dayz_code/system/antihack.sqf index 42757b1ad..54ee7b5f2 100644 --- a/SQF/dayz_code/system/antihack.sqf +++ b/SQF/dayz_code/system/antihack.sqf @@ -16,7 +16,7 @@ waitUntil {vehicle player == player}; publicVariableServer "PVDZE_atp"; //forceEnd; endMission "LOSER"; - sleep 10; //Bypass spam + uiSleep 10; //Bypass spam }; }; endMission "LOSER"; @@ -26,12 +26,12 @@ waitUntil {vehicle player == player}; _playerName = name player; _playerUID = [player] call FNC_GetPlayerUID; while {true} do { - sleep 5; + uiSleep 5; }; PVDZE_atp = format["WARNING PLAYER WITH NAME (%1) && UID# (%2) HAS CHANGED THE TRUE VALUE TO FALSE", _playerName, _playerUID]; publicVariableServer "PVDZE_atp"; endMission "LOSER"; - sleep 10; + uiSleep 10; }; [] spawn { @@ -44,7 +44,7 @@ waitUntil {vehicle player == player}; // run only once per character life { _plant = _x createVehicleLocal _debug; - sleep 0.1; + uiSleep 0.1; if (sizeOf _x == 0) exitWith { PVDZE_atp = "Plants texture hack for type " + _x; publicVariableServer "PVDZE_atp"; @@ -107,8 +107,8 @@ while {1 == 1} do { }; }; - sleep 0.25; + uiSleep 0.25; }; - sleep 0.1; + uiSleep 0.1; }; endMission "LOSER"; diff --git a/SQF/dayz_code/system/building_monitor.sqf b/SQF/dayz_code/system/building_monitor.sqf index 795dea4c5..50614dbf2 100644 --- a/SQF/dayz_code/system/building_monitor.sqf +++ b/SQF/dayz_code/system/building_monitor.sqf @@ -11,7 +11,7 @@ while {_run} do { if (_x distance _building < 500) then {_nearby = true}; } count (call BIS_fnc_listPlayers); if (!_nearby) then {_run = false}; - sleep 5; + uiSleep 5; }; {deleteVehicle _x;} count _items; diff --git a/SQF/dayz_code/system/dog_agent.fsm b/SQF/dayz_code/system/dog_agent.fsm index b4de1f47e..abbae6ba3 100644 --- a/SQF/dayz_code/system/dog_agent.fsm +++ b/SQF/dayz_code/system/dog_agent.fsm @@ -802,7 +802,7 @@ class FSM " _cantSee = [player, _dog] call dayz_losCheck;" \n " while {alive _dog && !(_cantSee)} do {" \n " _dog moveTo [0, ((random (10000)) + 1000), 0];" \n - " sleep 2;" \n + " uiSleep 2;" \n " _cantSee = [player, _dog] call dayz_losCheck;" \n " };" \n " deleteVehicle _dog;" \n @@ -810,7 +810,7 @@ class FSM " " \n " _handle setFSMVariable [""_thirst"",_thirst];" \n " _handle setFSMVariable [""_hunger"",_hunger];" \n - " sleep 0.5;" \n + " uiSleep 0.5;" \n " };" \n "};" \n "" \n diff --git a/SQF/dayz_code/system/fire_monitor.sqf b/SQF/dayz_code/system/fire_monitor.sqf index 42539d600..981485792 100644 --- a/SQF/dayz_code/system/fire_monitor.sqf +++ b/SQF/dayz_code/system/fire_monitor.sqf @@ -27,7 +27,7 @@ while {alive _firePlace} do { if (_countr > 600) then {_ok = false}; if (!inflamed _firePlace) then {_ok = false}; if (!alive _firePlace) then {_ok = false}; - sleep 1; + uiSleep 1; }; } else { _firePlace inflame false; @@ -35,7 +35,7 @@ while {alive _firePlace} do { }; while {!inflamed _firePlace && alive _fireplace} do { //Wait - sleep 1; + uiSleep 1; }; - sleep 1; + uiSleep 1; }; \ No newline at end of file diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index b072c8947..c49af1cd0 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -1171,7 +1171,7 @@ class FSM "dayz_monitor1 = [] spawn {" \n " while {true} do {" \n " call player_zombieCheck;" \n - " sleep 1;" \n + " uiSleep 1;" \n " };" \n "};" \n "" \n @@ -1250,7 +1250,7 @@ class FSM " _thisVehicle call player_antiWall;" \n " };" \n " };" \n - " sleep 0.2;" \n + " uiSleep 0.2;" \n " };" \n "};" \n "" \n @@ -1274,21 +1274,21 @@ class FSM "dayz_spawnCheck = [] spawn {" \n " while {true} do {" \n " [""both""] call player_spawnCheck;" \n - " sleep 8;" \n + " uiSleep 8;" \n " };" \n "};" \n "" \n "dayz_Totalzedscheck = [] spawn {" \n " while {true} do {" \n " dayz_maxCurrentZeds = {alive _x} count entities ""zZombie_Base"";" \n - " sleep 60;" \n + " uiSleep 60;" \n " };" \n "};" \n "" \n "dayz_backpackcheck = [] spawn {" \n " while {true} do {" \n " call player_dumpBackpack;" \n - " sleep 1;" \n + " uiSleep 1;" \n " };" \n "};" \n "" \n @@ -1311,7 +1311,7 @@ class FSM " if ((player getVariable[""combattimeout"", 0] >= time) || (_counter >= 60) || (player distance DZE_PROTOBOX > 2)) exitWith {" \n " deleteVehicle DZE_PROTOBOX;" \n " };" \n - " sleep 1;" \n + " uiSleep 1;" \n " _counter = _counter + 1;" \n " };" \n "};"/*%FSM*/; diff --git a/SQF/dayz_code/system/player_spawn_1.sqf b/SQF/dayz_code/system/player_spawn_1.sqf index 82a4bb740..155845efc 100644 --- a/SQF/dayz_code/system/player_spawn_1.sqf +++ b/SQF/dayz_code/system/player_spawn_1.sqf @@ -71,5 +71,5 @@ while {true} do { }; //wait - sleep 0.001; + uiSleep 0.001; }; \ No newline at end of file diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index 3b7fd8347..de041b963 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -258,5 +258,5 @@ while {true} do { "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, (r_player_blood/r_player_bloodTotal)], [1, 1, 1, 0.0]]; "colorCorrections" ppEffectCommit 0; - sleep 2; + uiSleep 2; }; diff --git a/SQF/dayz_server/compile/server_playerSync.sqf b/SQF/dayz_server/compile/server_playerSync.sqf index fdfb51fed..567e54254 100644 --- a/SQF/dayz_server/compile/server_playerSync.sqf +++ b/SQF/dayz_server/compile/server_playerSync.sqf @@ -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]; }; diff --git a/SQF/dayz_server/compile/server_publishVehicle.sqf b/SQF/dayz_server/compile/server_publishVehicle.sqf index d634fe892..69fefa99d 100644 --- a/SQF/dayz_server/compile/server_publishVehicle.sqf +++ b/SQF/dayz_server/compile/server_publishVehicle.sqf @@ -75,7 +75,7 @@ PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object]; // TODO: Needs major overhaul while {_retry < 10} do { - sleep 1; + uiSleep 1; // GET DB ID _key = format["CHILD:388:%1:",_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); diff --git a/SQF/dayz_server/compile/server_publishVehicle2.sqf b/SQF/dayz_server/compile/server_publishVehicle2.sqf index e1f83faee..97428ee6b 100644 --- a/SQF/dayz_server/compile/server_publishVehicle2.sqf +++ b/SQF/dayz_server/compile/server_publishVehicle2.sqf @@ -53,7 +53,7 @@ _key call server_hiveWrite; // TODO: Needs major overhaul for 1.1 while {_retry < 10} do { - sleep 1; + uiSleep 1; // GET DB ID _key = format["CHILD:388:%1:",_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); @@ -103,7 +103,7 @@ _key call server_hiveWrite; if(DZE_TRADER_SPAWNMODE) then { _object attachTo [_object_para, [0,0,-1.6]]; - sleep 1.0; + uiSleep 1; WaitUntil{(([_object] call FNC_GetPos) select 2) < 0.1}; detach _object; deleteVehicle _object_para; diff --git a/SQF/dayz_server/compile/server_publishVehicle3.sqf b/SQF/dayz_server/compile/server_publishVehicle3.sqf index e0f875c2f..92123c8a2 100644 --- a/SQF/dayz_server/compile/server_publishVehicle3.sqf +++ b/SQF/dayz_server/compile/server_publishVehicle3.sqf @@ -44,7 +44,7 @@ _key call server_hiveWrite; // TODO: Needs major overhaul for 1.1 while {_retry < 10} do { - sleep 1; + uiSleep 1; // GET DB ID _key = format["CHILD:388:%1:",_uid]; diag_log ("HIVE: WRITE: "+ str(_key)); diff --git a/SQF/dayz_server/compile/server_spawnCrashSite.sqf b/SQF/dayz_server/compile/server_spawnCrashSite.sqf index 80871f455..8347a39fb 100644 --- a/SQF/dayz_server/compile/server_spawnCrashSite.sqf +++ b/SQF/dayz_server/compile/server_spawnCrashSite.sqf @@ -40,9 +40,7 @@ while {1 == 1} do { diag_log(format["CRASHSPAWNER: %1%2 chance to spawn '%3' with loot table '%4' in %5 seconds", round(_spawnChance * 100), '%', _crashName, _lootTable, _timeToSpawn]); // Apprehensive about using one giant long sleep here given server time variances over the life of the server daemon - while {time < _timeToSpawn} do { - sleep 5; - }; + waituntil {time > _timeToSpawn}; _spawnRoll = random 1; diff --git a/SQF/dayz_server/compile/server_spawnEvent.sqf b/SQF/dayz_server/compile/server_spawnEvent.sqf index c5d33cb7a..b89755a03 100644 --- a/SQF/dayz_server/compile/server_spawnEvent.sqf +++ b/SQF/dayz_server/compile/server_spawnEvent.sqf @@ -57,5 +57,5 @@ while {1 == 1} do { } count EpochEvents; }; }; - sleep 10; + uiSleep 10; }; \ No newline at end of file diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 3eb13bea3..6ca990814 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -763,20 +763,20 @@ server_spawncleanDead = { if (_x isKindOf "zZombie_Base") then { _x call dayz_perform_purge; - sleep 0.05; + uiSleep 0.05; _delQtyZ = _delQtyZ + 1; } else { if (_x isKindOf "CAManBase") then { _deathTime = _x getVariable ["processedDeath", diag_tickTime]; if (diag_tickTime - _deathTime > 1800) then { _x call dayz_perform_purge_player; - sleep 0.025; + uiSleep 0.025; _delQtyP = _delQtyP + 1; }; }; }; }; - sleep 0.025; + uiSleep 0.025; } count _allDead; if (_delQtyZ > 0 || _delQtyP > 0) then { _qty = count _allDead; @@ -791,7 +791,7 @@ server_cleanupGroups = { if ((count (units _x) == 0) && (_x != grpNull)) then { deleteGroup _x; }; - sleep 0.001; + uiSleep 0.001; } count allGroups; DZE_DYN_GroupCleanup = nil; }; @@ -806,10 +806,10 @@ server_checkHackers = { diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x)); (vehicle _x) setDamage 1; _x setDamage 1; - sleep 0.25; + uiSleep 0.25; }; }; - sleep 0.001; + uiSleep 0.001; } count allUnits; DZE_DYN_HackerCheck = nil; }; @@ -821,10 +821,10 @@ server_spawnCleanFire = { { if (local _x) then { deleteVehicle _x; - sleep 0.025; + uiSleep 0.025; _delQtyFP = _delQtyFP + 1; }; - sleep 0.001; + uiSleep 0.001; } count _missionFires; if (_delQtyFP > 0) then { _qty = count _missionFires; @@ -855,14 +855,14 @@ server_spawnCleanLoot = { _nearby = { (isPlayer _x) && (alive _x) } count(_x nearEntities[["CAManBase", "AllVehicles"], 130]); if (_nearby == 0) then{ deleteVehicle _x; - sleep 0.025; + uiSleep 0.025; _delQty = _delQty + 1; }; }; }; }; }; - sleep 0.001; + uiSleep 0.001; } forEach _missionObjs; if (_delQty > 0) then { _qty = count _missionObjs; @@ -878,7 +878,7 @@ server_spawnCleanAnimals = { { if (local _x) then { _x call dayz_perform_purge; - sleep 0.05; + uiSleep 0.05; _delQtyAnimal = _delQtyAnimal + 1; } else { if (!alive _x) then { @@ -887,13 +887,13 @@ server_spawnCleanAnimals = { _nearby = {(isPlayer _x) && (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 130]); if (_nearby==0) then { _x call dayz_perform_purge; - sleep 0.05; + uiSleep 0.05; _delQtyAnimal = _delQtyAnimal + 1; }; }; }; }; - sleep 0.001; + uiSleep 0.001; } forEach _missonAnimals; if (_delQtyAnimal > 0) then { _qty = count _missonAnimals; diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 336bf1216..7e630826c 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -347,7 +347,7 @@ if (isServer && isNil "sm_done") then { // server cleanup [] spawn { private ["_id"]; - sleep 200; //Sleep Lootcleanup, don't need directly cleanup on startup + fix some performance issues on serverstart + uiSleep 200; //Sleep Lootcleanup, don't need directly cleanup on startup + fix some performance issues on serverstart waitUntil {!isNil "server_spawnCleanAnimals"}; _id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm"; };