mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 23:50:48 +03:00
Replace sleep with uiSleep
see the below links for more info. uiSleep is based off of a more accurate method of tracking time, whereas sleep can fluctuate depending on application performance since it is based on framerate. https://community.bistudio.com/wiki/uiSleep https://community.bistudio.com/wiki/sleep_vs_uiSleep https://community.bistudio.com/wiki/sleep
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
uiSleep 0.01;
|
||||
@@ -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;
|
||||
};
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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]];
|
||||
|
||||
@@ -6,4 +6,4 @@ _unit = _this select 0;
|
||||
_unit setCaptive 3;
|
||||
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||
_unit allowDamage false;
|
||||
sleep 0.01;
|
||||
uiSleep 0.01;
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -36,7 +36,7 @@ while {r_doLoop} do {
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user