Switch often called functions from private to local

This commit is contained in:
AirwavesMan
2021-01-14 09:24:06 +01:00
parent 1d826ac331
commit 63a3535f37
12 changed files with 368 additions and 375 deletions

View File

@@ -6,26 +6,24 @@ sched_gravity_init = {
};
sched_gravity = {
private ["_otime","_opos","_offtime","_offpos","_oid","_idTrickCount","_timeTrickCount","_time","_ppos","_fftime","_ffpos","_pid","_netid","_initDone"];
if ((!(_this select 5) and !isNil 'Dayz_loginCompleted') and {(Dayz_loginCompleted)}) then {
_this = [ time, VisiblePositionASL player, time, VisiblePositionASL player, false, true];
//diag_log [ diag_tickTime, __FILE__, "freefall inited" ];
};
_otime = _this select 0;
_opos = _this select 1;
_offtime = _this select 2;
_offpos = _this select 3;
_inprogress = _this select 4;
_initDone = _this select 5;
local _otime = _this select 0;
local _opos = _this select 1;
local _offtime = _this select 2;
local _offpos = _this select 3;
local _inprogress = _this select 4;
local _initDone = _this select 5;
if (_initDone) then {
// detect and save freefall start
_time = time;
_ppos = VisiblePositionASL player;
_fftime = _time;
_ffpos = +(_ppos);
local _time = time;
local _ppos = VisiblePositionASL player;
local _fftime = _time;
local _ffpos = +(_ppos);
if ((_opos select 2) - (_ppos select 2) >= if (_inprogress) then {0.1} else {0.39} ) then {
_fftime = _offtime;
_ffpos = +(_offpos);