mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-18 10:16:39 +03:00
Switch often called functions from private to local
This commit is contained in:
@@ -17,10 +17,8 @@ sched_medical_slow = { // 10 seconds
|
||||
sched_medical_init = { [ []spawn{} ] };
|
||||
sched_medical = { // 1 second
|
||||
HIDE_FSM_VARS
|
||||
|
||||
private ["_unconHdlr","_lowBlood"];
|
||||
|
||||
_unconHdlr = _this select 0;
|
||||
local _unconHdlr = _this select 0;
|
||||
|
||||
if (r_player_blood == r_player_bloodTotal) then {
|
||||
r_player_foodstack = 0;
|
||||
@@ -33,7 +31,7 @@ sched_medical = { // 1 second
|
||||
};
|
||||
|
||||
if (!canStand player) then { // be consistant with player_updateGui.sqf
|
||||
if ((player getVariable ["hit_legs", 0] < 1) OR !r_fracture_legs) then {
|
||||
if ((player getVariable ["hit_legs", 0] < 1) || !r_fracture_legs) then {
|
||||
player setVariable ["hit_legs",1,true];
|
||||
r_fracture_legs = true;
|
||||
};
|
||||
@@ -50,8 +48,8 @@ sched_medical = { // 1 second
|
||||
};
|
||||
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [random 4]; "dynamicBlur" ppEffectCommit 0.2;
|
||||
};
|
||||
_lowBlood = player getVariable ["USEC_lowBlood", false];
|
||||
if ((r_player_blood < r_player_bloodTotal) and {!_lowBlood}) then {
|
||||
local _lowBlood = player getVariable ["USEC_lowBlood", false];
|
||||
if ((r_player_blood < r_player_bloodTotal) && !_lowBlood) then {
|
||||
player setVariable["USEC_lowBlood",true,true];
|
||||
};
|
||||
|
||||
@@ -61,7 +59,7 @@ sched_medical = { // 1 second
|
||||
};
|
||||
|
||||
//Handle Unconscious player
|
||||
if ((r_player_unconscious) and {!r_player_unconsciousInProgress} and {scriptDone _unconHdlr}) then {
|
||||
if ((r_player_unconscious) && !r_player_unconsciousInProgress && (scriptDone _unconHdlr)) then {
|
||||
//localize "CLIENT: Start Unconscious Function";
|
||||
_unconHdlr = [] spawn fnc_usec_unconscious;
|
||||
};
|
||||
@@ -79,13 +77,11 @@ sched_medical = { // 1 second
|
||||
};
|
||||
|
||||
sched_medical_effects_init = {
|
||||
private ["_hndCC", "_hndDB", "_hndRB"];
|
||||
|
||||
_hndCC = ppEffectCreate ["colorCorrections", 3];
|
||||
local _hndCC = ppEffectCreate ["colorCorrections", 3];
|
||||
_hndCC ppEffectEnable true;
|
||||
_hndDB = ppEffectCreate ["dynamicBlur", 2];
|
||||
local _hndDB = ppEffectCreate ["dynamicBlur", 2];
|
||||
_hndDB ppEffectEnable true;
|
||||
_hndRB = ppEffectCreate ["radialBlur", 1];
|
||||
local _hndRB = ppEffectCreate ["radialBlur", 1];
|
||||
_hndRB ppEffectEnable true;
|
||||
_hndRB ppEffectAdjust [0, 0, 0.5, 0.5];
|
||||
_hndRB ppEffectCommit 0;
|
||||
@@ -97,12 +93,12 @@ sched_medical_effects = {
|
||||
// every 2 seconds:
|
||||
// change saturation, blur and vignetting according to blood level
|
||||
// Shivering if character temperature is near the minimum
|
||||
|
||||
private ["_hndCC", "_hndDB", "_tmp1", "_tmp2", "_tmp3","_hndRB"];
|
||||
|
||||
_hndCC = _this select 0;
|
||||
_hndDB = _this select 1;
|
||||
_hndRB = _this select 2;
|
||||
local _hndCC = _this select 0;
|
||||
local _hndDB = _this select 1;
|
||||
local _hndRB = _this select 2;
|
||||
local _tmp1 = 0;
|
||||
local _tmp2 = 0;
|
||||
local _tmp3 = 0;
|
||||
|
||||
if (r_player_infected) then {
|
||||
_tmp1 = 0.4 + 0.06 * cos(diag_tickTime * 360 / 12);
|
||||
@@ -131,7 +127,7 @@ sched_medical_effects = {
|
||||
[_hndCC, _hndDB, _hndRB] ppEffectCommit 1.5;
|
||||
|
||||
//Add Shivering
|
||||
if (dayz_temperatur <= (0.125 * (dayz_temperaturmax - dayz_temperaturmin) + dayz_temperaturmin) and {(vehicle player == player and speed player < 5) or (vehicle player != player)}) then {
|
||||
if (dayz_temperatur <= (0.125 * (dayz_temperaturmax - dayz_temperaturmin) + dayz_temperaturmin) && {((vehicle player == player) && (speed player < 5)) || (vehicle player != player)}) then {
|
||||
addCamShake [0.6 * (dayz_temperaturmin / dayz_temperatur), 2, 30];
|
||||
};
|
||||
|
||||
@@ -142,7 +138,7 @@ sched_medical_effectsSlow = {
|
||||
// every 10 seconds
|
||||
HIDE_FSM_VARS
|
||||
|
||||
if (!r_player_unconscious && {r_player_infected or r_player_inpain}) then {
|
||||
if (!r_player_unconscious && {r_player_infected || r_player_inpain}) then {
|
||||
//Original pain shake was stronger [2, 1, 25]
|
||||
//Low blood still uses strong shake in init_medical.sqf
|
||||
addCamShake [1, 1, 20];
|
||||
@@ -150,7 +146,7 @@ sched_medical_effectsSlow = {
|
||||
if (!r_player_infected) then {
|
||||
playSound "breath_1"; //In pain
|
||||
} else {
|
||||
if ((1 > random 2) && {speed player < 5 or {vehicle player != player}}) then {
|
||||
if ((1 > random 2) && {speed player < 5 || {vehicle player != player}}) then {
|
||||
[player,"cough",1,false] call dayz_zombieSpeak;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user