mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
All instances of time and diagTicktime changed to ACE_time / ACE_diagTime.
This commit is contained in:
parent
1f105a9596
commit
c924baefd7
@ -5,7 +5,7 @@
|
||||
GVAR(currentbulletID) = -1;
|
||||
|
||||
GVAR(Protractor) = false;
|
||||
GVAR(ProtractorStart) = time;
|
||||
GVAR(ProtractorStart) = ACE_time;
|
||||
|
||||
GVAR(currentGrid) = 0;
|
||||
GVAR(initMessageEnabled) = false;
|
||||
|
@ -114,7 +114,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th
|
||||
|
||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)];
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)];
|
||||
|
||||
[{
|
||||
private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
|
||||
@ -137,6 +137,6 @@ GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(ACE_time), ACE_time - floor(ACE_time)]);
|
||||
|
||||
}, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -18,7 +18,7 @@ if (!GVAR(extensionAvailable)) exitWith {};
|
||||
|
||||
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
|
||||
|
||||
_initStartTime = time;
|
||||
_initStartTime = ACE_time;
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
|
||||
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
||||
@ -41,7 +41,7 @@ GVAR(currentGrid) = 0;
|
||||
|
||||
if (GVAR(currentGrid) >= _gridCells) exitWith {
|
||||
if (GVAR(initMessageEnabled)) then {
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(time - _initStartTime)];
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
|
||||
};
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ if !(ctrlVisible 9000) then {
|
||||
if (!(GVAR(speedAssistTimer))) exitWith {
|
||||
GVAR(speedAssistTimer) = true;
|
||||
|
||||
ctrlSetText [8006, Str(Round((time - _startTime) * 10) / 10)];
|
||||
ctrlSetText [8006, Str(Round((ACE_time - _startTime) * 10) / 10)];
|
||||
|
||||
[] call FUNC(calculate_target_speed_assist);
|
||||
|
||||
@ -40,7 +40,7 @@ if !(ctrlVisible 9000) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
ctrlSetText [9001, Str(Round((time - _startTime) * 10) / 10)];
|
||||
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];
|
||||
|
||||
}, 0.1, [time]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0.1, [ACE_time]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -89,7 +89,7 @@ if (_state) then {
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_2_PVT(_args,_unit,_maxTime);
|
||||
//If waited long enough or they re-surrendered or they are unconscious, exit loop
|
||||
if ((time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
|
||||
if ((ACE_time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
|
||||
@ -98,6 +98,6 @@ if (_state) then {
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}, 0, [_unit, (time + 20)]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0, [_unit, (ACE_time + 20)]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ if (hasInterface) then {
|
||||
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (time > 0) exitWith {
|
||||
if (ACE_time > 0) exitWith {
|
||||
[QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
};
|
||||
|
||||
@ -223,7 +223,7 @@ GVAR(OldIsCamera) = false;
|
||||
["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep time if you need it.
|
||||
}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it.
|
||||
|
||||
|
||||
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
@ -244,7 +244,7 @@ GVAR(OldIsCamera) = false;
|
||||
|
||||
// Lastly, do JIP events
|
||||
// JIP Detection and event trigger. Run this at the very end, just in case anything uses it
|
||||
if(isMultiplayer && { time > 0 || isNull player } ) then {
|
||||
if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
|
||||
// We are jipping! Get ready and wait, and throw the event
|
||||
[{
|
||||
if(!(isNull player)) then {
|
||||
|
@ -28,7 +28,7 @@ if(isServer) then {
|
||||
if(_ttl > -1) then {
|
||||
_internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
_eventLog = _internalData select 1;
|
||||
_eventLog pushback [diag_tickTime, _args, _ttl];
|
||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. Argument will be [Interval] where 'Interval' is a number.
|
||||
* Add an event handler that executes every ACE_time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games. Argument will be [Interval] where 'Interval' is a number.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Code to execute (Code or String)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: esteldunedain and Jaynus
|
||||
* Returns the result of the function and caches it up to a given time or event
|
||||
* Returns the result of the function and caches it up to a given ACE_time or event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Parameters <ARRAY>
|
||||
@ -21,8 +21,8 @@ PARAMS_5(_params,_function,_namespace,_uid,_duration);
|
||||
|
||||
//IGNORE_PRIVATE_WARNING("_eventName");
|
||||
|
||||
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
|
||||
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
|
||||
if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
|
||||
_namespace setVariable [_uid, [ACE_diagTime + _duration, _params call _function]];
|
||||
|
||||
// Does the cache needs to be cleared on an event?
|
||||
if (count _this > 5) then {
|
||||
|
@ -86,11 +86,11 @@ _refresh = {
|
||||
|
||||
if (_show) then {
|
||||
if ({(_x select 0 == _iconId)} count _list == 0) then {
|
||||
_list pushback [_iconId, _icon, _color, time];
|
||||
_list pushback [_iconId, _icon, _color, ACE_time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, ACE_time]];
|
||||
};
|
||||
} forEach _list;
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
|
||||
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
|
||||
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
|
||||
|
||||
_time = time;
|
||||
_time = ACE_time;
|
||||
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
|
||||
hintSilent _text;
|
||||
if (_sound) then {playSound "ACE_Sound_Click"};
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Glowbal, PabstMirror
|
||||
* Get the death animation for the unit at current time
|
||||
* Get the death animation for the unit at current ACE_time
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <OBJECT>
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_val", "_index"];
|
||||
// diag_log text format["%1 HASH GET: %2", diag_tickTime, _this];
|
||||
// diag_log text format["%1 HASH GET: %2", ACE_diagTime, _this];
|
||||
|
||||
PARAMS_2(_hash,_key);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_val", "_index"];
|
||||
// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this];
|
||||
// diag_log text format["%1 HASH HAS KEY: %2", ACE_diagTime, _this];
|
||||
|
||||
PARAMS_2(_hash,_key);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_index"];
|
||||
// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this];
|
||||
// diag_log text format["%1 HASH SET: %2", ACE_diagTime, _this];
|
||||
|
||||
PARAMS_3(_hash,_key,_val);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
|
||||
*
|
||||
* Argument:
|
||||
* 0: NUMBER - Total Time (in game "time" seconds)
|
||||
* 0: NUMBER - Total Time (in game "ACE_time" seconds)
|
||||
* 1: ARRAY - Arguments, passed to condition, fail and finish
|
||||
* 2: CODE or STRING - On Finish: Code called or STRING raised as event.
|
||||
* 3: CODE or STRING - On Failure: Code called or STRING raised as event.
|
||||
@ -53,7 +53,7 @@ _perFrameFunction = {
|
||||
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
|
||||
private ["_elapsedTime", "_errorCode"];
|
||||
|
||||
_elapsedTime = time - _startTime;
|
||||
_elapsedTime = ACE_time - _startTime;
|
||||
_errorCode = -1;
|
||||
|
||||
// this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all.
|
||||
@ -105,4 +105,4 @@ _perFrameFunction = {
|
||||
};
|
||||
};
|
||||
|
||||
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;
|
||||
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, ACE_time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -41,7 +41,7 @@ GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = _target addAction ["Decline", compile
|
||||
|
||||
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = _requestID;
|
||||
|
||||
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
|
||||
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
|
||||
private["_id", "_t", "_requestID", "_target"];
|
||||
_t = (_this select 0) + 40;
|
||||
_target = _this select 1;
|
||||
@ -50,7 +50,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
|
||||
waituntil {
|
||||
_id = _target getvariable _requestID;
|
||||
|
||||
(time > _t || isnil "_id")};
|
||||
(ACE_time > _t || isnil "_id")};
|
||||
_target setvariable [_requestID, nil];
|
||||
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;
|
||||
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Sets a public variable, but wait a certain amount of time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
|
||||
* Sets a public variable, but wait a certain amount of ACE_time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object the variable should be assigned to (Object)
|
||||
* 1: Name of the variable (String)
|
||||
* 2: Value of the variable (Any)
|
||||
* 3: Windup time (Number, optional. Default: 1)
|
||||
* 3: Windup ACE_time (Number, optional. Default: 1)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing.
|
||||
@ -38,12 +38,12 @@ if (_idName in _allIdNames) exitWith {};
|
||||
|
||||
// when to push the value
|
||||
private "_syncTime";
|
||||
_syncTime = diag_tickTime + _sync;
|
||||
_syncTime = ACE_diagTime + _sync;
|
||||
|
||||
// add eventhandler
|
||||
[_idName, "onEachFrame", {
|
||||
// wait to sync the variable
|
||||
if (diag_tickTime > _this select 2) then {
|
||||
if (ACE_diagTime > _this select 2) then {
|
||||
// set value public
|
||||
(_this select 0) setVariable [_this select 1, (_this select 0) getVariable (_this select 1), true];
|
||||
|
||||
|
@ -24,7 +24,7 @@ private["_data"];
|
||||
if(typeName _globalEventTTL == "CODE") then {
|
||||
_ttlReturn = [(_data select 0),_eventEntry] call _globalEventTTL;
|
||||
} else {
|
||||
_ttlReturn = call { _globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL} };
|
||||
_ttlReturn = call { _globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL} };
|
||||
};
|
||||
|
||||
if(_ttlReturn) then {
|
||||
@ -35,7 +35,7 @@ private["_data"];
|
||||
if(typeName _eventTTL == "CODE") then {
|
||||
_ttlReturn = [(_data select 0),_eventEntry] call _eventTTL;
|
||||
} else {
|
||||
_ttlReturn = call { _eventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _eventTTL} };
|
||||
_ttlReturn = call { _eventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _eventTTL} };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
PARAMS_3(_unit,_varName,_maxDelay);
|
||||
|
||||
// Create the publish scheduler PFH the first time
|
||||
// Create the publish scheduler PFH the first ACE_time
|
||||
if (isNil QGVAR(publishSchedId)) then {
|
||||
|
||||
GVAR(publishVarNames) = [];
|
||||
@ -27,7 +27,7 @@ if (isNil QGVAR(publishSchedId)) then {
|
||||
|
||||
GVAR(publishSchedId) = [{
|
||||
|
||||
if (diag_tickTime > GVAR(publishNextTime)) then {
|
||||
if (ACE_diagTime > GVAR(publishNextTime)) then {
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_unit,_varName);
|
||||
_unit setVariable [_varName, (_unit getVariable _varName), true];
|
||||
@ -42,8 +42,8 @@ if (isNil QGVAR(publishSchedId)) then {
|
||||
// If the variable is not on the list
|
||||
if (GVAR(publishVarNames) find [_unit,_varName] == -1) exitWith {
|
||||
GVAR(publishVarNames) pushBack [_unit,_varName];
|
||||
GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
|
||||
GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);
|
||||
};
|
||||
|
||||
// If the variable is on the list
|
||||
GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
|
||||
GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);
|
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Executes a code once with a given game time delay, using a PFH
|
||||
* Executes a code once with a given game ACE_time delay, using a PFH
|
||||
*
|
||||
* Argument:
|
||||
* 0: Code to execute (Code)
|
||||
* 1: Parameters to run the code with (Array)
|
||||
* 2: Delay in seconds before executing the code (Number)
|
||||
* 3: Interval of time in which the execution is evaluated, 0 means every frame (Number)
|
||||
* 3: Interval of ACE_time in which the execution is evaluated, 0 means every frame (Number)
|
||||
*
|
||||
* Return value:
|
||||
* PFH handler ID
|
||||
@ -22,8 +22,8 @@ PARAMS_4(_func,_params,_delay,_interval);
|
||||
EXPLODE_2_PVT(_params,_delayedExecParams,_startTime);
|
||||
EXPLODE_3_PVT(_delayedExecParams,_func,_funcParams,_delay);
|
||||
|
||||
// Exit if the time was not reached yet
|
||||
if (time < _startTime + _delay) exitWith {};
|
||||
// Exit if the ACE_time was not reached yet
|
||||
if (ACE_time < _startTime + _delay) exitWith {};
|
||||
|
||||
// Remove the PFH
|
||||
[_pfhId] call cba_fnc_removePerFrameHandler;
|
||||
@ -32,5 +32,5 @@ PARAMS_4(_func,_params,_delay,_interval);
|
||||
_funcParams call _func;
|
||||
},
|
||||
_interval,
|
||||
[_this, time]
|
||||
[_this, ACE_time]
|
||||
] call CBA_fnc_addPerFrameHandler
|
||||
|
@ -64,7 +64,7 @@ if (isNull _holder) then {
|
||||
if (isNull _holder) exitWith {
|
||||
[_caller, _target, "Debug: Null Holder"] call FUNC(eventTargetFinish);
|
||||
};
|
||||
//Make sure only one drop operation at a time (using PFEH system as a queue)
|
||||
//Make sure only one drop operation at a ACE_time (using PFEH system as a queue)
|
||||
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(disarmDropItems);
|
||||
@ -178,7 +178,7 @@ if (_holderIsEmpty) then {
|
||||
_needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove};
|
||||
_needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove};
|
||||
|
||||
if ((time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
|
||||
if ((ACE_time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
|
||||
//action drop weapons (keeps loaded magazine and attachements)
|
||||
{
|
||||
if (_x in _listOfItemsToRemove) then {
|
||||
@ -234,7 +234,7 @@ if (_holderIsEmpty) then {
|
||||
clearItemCargoGlobal _holder;
|
||||
};
|
||||
//Verify we didn't timeout waiting on drop action
|
||||
if (time >= _maxWaitTime) exitWith {
|
||||
if (ACE_time >= _maxWaitTime) exitWith {
|
||||
_holder setVariable [QGVAR(holderInUse), false];
|
||||
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
|
||||
};
|
||||
@ -264,4 +264,4 @@ if (_holderIsEmpty) then {
|
||||
[_caller, _target, ""] call FUNC(eventTargetFinish);
|
||||
};
|
||||
|
||||
}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (ACE_time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -22,4 +22,4 @@ PARAMS_3(_caller,_target,_errorMsg);
|
||||
if (_caller != ACE_player) exitWith {};
|
||||
|
||||
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
|
||||
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", time, _this];
|
||||
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", ACE_time, _this];
|
||||
|
@ -21,6 +21,6 @@
|
||||
PARAMS_3(_caller,_target,_errorMsg);
|
||||
|
||||
if (_errorMsg != "") then {
|
||||
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", time, _this];
|
||||
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this];
|
||||
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DRAGGING
|
||||
systemChat format ["%1 carryObjectPFH running", time];
|
||||
systemChat format ["%1 carryObjectPFH running", ACE_time];
|
||||
#endif
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DRAGGING
|
||||
systemChat format ["%1 dragObjectPFH running", time];
|
||||
systemChat format ["%1 dragObjectPFH running", ACE_time];
|
||||
#endif
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
@ -26,7 +26,7 @@ if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith {
|
||||
};
|
||||
|
||||
private "_timer";
|
||||
_timer = time + 5;
|
||||
_timer = ACE_time + 5;
|
||||
|
||||
// handle objects vs persons
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
@ -46,7 +46,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
[_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation);
|
||||
[_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation);
|
||||
|
||||
_timer = time + 15;
|
||||
_timer = ACE_time + 15;
|
||||
|
||||
} else {
|
||||
|
||||
@ -62,7 +62,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
[_unit, _target, true] call EFUNC(common,claim);
|
||||
|
||||
|
||||
// prevents draging and carrying at the same time
|
||||
// prevents draging and carrying at the same ACE_time
|
||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||
|
||||
// required for aborting animation
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DRAGGING
|
||||
systemChat format ["%1 startCarryPFH running", time];
|
||||
systemChat format ["%1 startCarryPFH running", ACE_time];
|
||||
#endif
|
||||
|
||||
private ["_unit", "_target", "_timeOut"];
|
||||
@ -24,13 +24,13 @@ if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}
|
||||
|
||||
// handle persons vs objects
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
if (time > _timeOut) exitWith {
|
||||
if (ACE_time > _timeOut) exitWith {
|
||||
[_unit, _target] call FUNC(carryObject);
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
} else {
|
||||
if (time > _timeOut) exitWith {
|
||||
if (ACE_time > _timeOut) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
// drop if in timeout
|
||||
|
@ -48,7 +48,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
[_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
// prevents draging and carrying at the same time
|
||||
// prevents draging and carrying at the same ACE_time
|
||||
_unit setVariable [QGVAR(isDragging), true, true];
|
||||
|
||||
[FUNC(startDragPFH), 0.2, [_unit, _target, time + 5]] call CBA_fnc_addPerFrameHandler;
|
||||
[FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DRAGGING
|
||||
systemChat format ["%1 startDragPFH running", time];
|
||||
systemChat format ["%1 startDragPFH running", ACE_time];
|
||||
#endif
|
||||
|
||||
private ["_unit", "_target", "_timeOut"];
|
||||
@ -22,8 +22,8 @@ if ((!([_target] call EFUNC(common,isAlive))) || {(_unit distance _target) > 10}
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// timeout. Do nothing. Quit. time, because anim length is linked to ingame time.
|
||||
if (time > _timeOut) exitWith {
|
||||
// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame ACE_time.
|
||||
if (ACE_time > _timeOut) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
// drop if in timeout
|
||||
|
@ -7,7 +7,7 @@
|
||||
* 1: Max range (-1 to ignore) <NUMBER>
|
||||
* 2: Explosive <ARRAY>
|
||||
* 0: Explosive <OBJECT>
|
||||
* 1: Fuse time <NUMBER>
|
||||
* 1: Fuse ACE_time <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(enabled) = false;
|
||||
GVAR(time) = 0;
|
||||
GVAR(ACE_time) = 0;
|
||||
GVAR(position) = [0,0,0];
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
@ -22,7 +22,7 @@ _distance = call FUNC(getRange);
|
||||
if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
|
||||
|
||||
GVAR(Enabled) = true;
|
||||
GVAR(Time) = time;
|
||||
GVAR(Time) = ACE_time;
|
||||
|
||||
if (_distance == 0) then {
|
||||
_distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision
|
||||
|
@ -60,7 +60,7 @@ private ["_movingAzimuth", "_posTarget", "_velocityTarget"];
|
||||
|
||||
// MOVING TARGETS
|
||||
_movingAzimuth = 0;
|
||||
if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
|
||||
if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) then {
|
||||
// calculate speed of target
|
||||
_posTarget = [
|
||||
(getPos _vehicle select 0) + _distance * (_weaponDirection select 0),
|
||||
@ -68,14 +68,14 @@ if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
|
||||
(getPos _vehicle select 2) + _distance * (_weaponDirection select 2)
|
||||
];
|
||||
_velocityTarget = [
|
||||
((_posTarget select 0) - (GVAR(position) select 0)) / (time - GVAR(time)),
|
||||
((_posTarget select 1) - (GVAR(position) select 1)) / (time - GVAR(time)),
|
||||
((_posTarget select 2) - (GVAR(position) select 2)) / (time - GVAR(time))
|
||||
((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(ACE_time)),
|
||||
((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(ACE_time)),
|
||||
((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(ACE_time))
|
||||
];
|
||||
|
||||
private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"];
|
||||
|
||||
// estimate time to target
|
||||
// estimate ACE_time to target
|
||||
_magazineType = _vehicle currentMagazineTurret _turret;
|
||||
_ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo");
|
||||
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed");
|
||||
@ -130,7 +130,7 @@ if (time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
|
||||
};
|
||||
};
|
||||
GVAR(enabled) = false;
|
||||
GVAR(time) = -1;
|
||||
GVAR(ACE_time) = -1;
|
||||
|
||||
private ["_viewDiff", "_FCSAzimuth", "_FCSMagazines", "_FCSElevation"];
|
||||
|
||||
|
@ -20,4 +20,4 @@ _positions set[(count _positions), [(getPos _obj), _objSpd]];
|
||||
_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
|
||||
|
||||
GVAR(traces) set[_index, _data];
|
||||
[DFUNC(trackTrace), 0, [_obj, _index, time]] call cba_fnc_addPerFrameHandler;
|
||||
[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call cba_fnc_addPerFrameHandler;
|
||||
|
@ -50,7 +50,7 @@ if(_doFragTrack && alive _round) then {
|
||||
GVAR(trackedObjects) pushBack _round;
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler;
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, ACE_time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler;
|
||||
if(_doSpall) then {
|
||||
[_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
if(!isServer) exitWith { };
|
||||
|
||||
// _startTime = diag_tickTime;
|
||||
// _startTime = ACE_diagTime;
|
||||
|
||||
private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"];
|
||||
|
||||
@ -214,4 +214,4 @@ if(_isArmed && (count _objects) > 0) then {
|
||||
// ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
|
||||
// ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
|
||||
// #endif
|
||||
// _endTime = diag_tickTime;
|
||||
// _endTime = ACE_diagTime;
|
||||
|
@ -13,7 +13,7 @@ _foundObjectHPIds = _params select 8;
|
||||
|
||||
if (!alive _round) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_time != time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then {
|
||||
if(_time != ACE_time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
_skip = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip));
|
||||
if(_skip == 0) then {
|
||||
|
@ -17,16 +17,16 @@ private ["_interval", "_player", "_newVel", "_accel", "_currentGForce", "_averag
|
||||
|
||||
EXPLODE_2_PVT(_this,_params,_pfhId);
|
||||
|
||||
_interval = time - GVAR(lastUpdateTime);
|
||||
_interval = ACE_time - GVAR(lastUpdateTime);
|
||||
|
||||
// Update the g-forces at constant game time intervals
|
||||
// Update the g-forces at constant game ACE_time intervals
|
||||
if (_interval < INTERVAL) exitWith {};
|
||||
|
||||
if (isNull ACE_player) exitWith {};
|
||||
|
||||
if !(alive ACE_player) exitWith {};
|
||||
|
||||
GVAR(lastUpdateTime) = time;
|
||||
GVAR(lastUpdateTime) = ACE_time;
|
||||
|
||||
/*if !(vehicle ACE_player isKindOf "Air") exitWith {
|
||||
GVAR(GForces) = [];
|
||||
|
@ -38,7 +38,7 @@ if (GVAR(DustHandler) != -1) then { // should be fixed in dev CBA
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
GVAR(DustHandler) = [{
|
||||
if (diag_tickTime >= GETDUSTT(DTIME) + 3) then {
|
||||
if (ACE_diagTime >= GETDUSTT(DTIME) + 3) then {
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
||||
private "_amount";
|
||||
_amount = 1 - (GETDUSTT(DAMOUNT) * 0.125);
|
||||
|
@ -48,13 +48,13 @@ if (!_found) exitWith {};
|
||||
|
||||
_bullets = GETDUSTT(DBULLETS);
|
||||
|
||||
if ((diag_tickTime - GETDUSTT(DTIME)) > 1) then {
|
||||
if ((ACE_diagTime - GETDUSTT(DTIME)) > 1) then {
|
||||
_bullets = 0;
|
||||
};
|
||||
|
||||
_bullets = _bullets + 1;
|
||||
SETDUST(DBULLETS,_bullets);
|
||||
SETDUST(DTIME,diag_tickTime);
|
||||
SETDUST(DTIME,ACE_diagTime);
|
||||
|
||||
if (GETDUSTT(DAMOUNT) < 2) then {
|
||||
private "_bulletsRequired";
|
||||
|
@ -103,7 +103,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
|
||||
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
|
||||
GVAR(flashbangPPEffectCC) ppEffectCommit 0.01;
|
||||
|
||||
//PARTIALRECOVERY - start decreasing effect over time
|
||||
//PARTIALRECOVERY - start decreasing effect over ACE_time
|
||||
[{
|
||||
PARAMS_1(_strength);
|
||||
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
|
||||
|
@ -38,7 +38,7 @@ if (GVAR(currentDeafness) > 0.7) then {
|
||||
};
|
||||
};
|
||||
|
||||
// Deafness recovers with time
|
||||
// Deafness recovers with ACE_time
|
||||
GVAR(currentDeafness) = GVAR(currentDeafness) - _recoverRate max 0;
|
||||
|
||||
// needed until Bohemia fixes playSound to actually use the second argument
|
||||
|
@ -45,7 +45,7 @@ GVAR(keyDownSelfAction) = false;
|
||||
GVAR(keyDownTime) = 0;
|
||||
GVAR(openedMenuType) = -1;
|
||||
|
||||
GVAR(lastTime) = diag_tickTime;
|
||||
GVAR(lastTime) = ACE_diagTime;
|
||||
GVAR(rotationAngle) = 0;
|
||||
|
||||
GVAR(selectedAction) = [[],[]];
|
||||
@ -61,8 +61,8 @@ GVAR(lastPath) = [];
|
||||
|
||||
GVAR(expanded) = false;
|
||||
|
||||
GVAR(startHoverTime) = diag_tickTime;
|
||||
GVAR(expandedTime) = diag_tickTime;
|
||||
GVAR(startHoverTime) = ACE_diagTime;
|
||||
GVAR(expandedTime) = ACE_diagTime;
|
||||
GVAR(iconCtrls) = [];
|
||||
GVAR(iconCount) = 0;
|
||||
|
||||
|
@ -27,7 +27,7 @@ if (_menuType == 0) then {
|
||||
GVAR(keyDown) = false;
|
||||
GVAR(keyDownSelfAction) = true;
|
||||
};
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
GVAR(keyDownTime) = ACE_diagTime;
|
||||
GVAR(openedMenuType) = _menuType;
|
||||
GVAR(lastTimeSearchedActions) = -1000;
|
||||
GVAR(ParsedTextCached) = [];
|
||||
|
@ -48,7 +48,7 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
_closest = GVAR(currentOptions) select _closestSelection;
|
||||
|
||||
_sPos = _closest select 1;
|
||||
_cTime = diag_tickTime;
|
||||
_cTime = ACE_diagTime;
|
||||
_delta = _cTime - GVAR(lastTime);
|
||||
GVAR(lastTime) = _cTime;
|
||||
|
||||
@ -73,17 +73,17 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
} forEach GVAR(lastPath);
|
||||
};
|
||||
|
||||
if(_misMatch && {diag_tickTime-GVAR(expandedTime) > 0.25}) then {
|
||||
GVAR(startHoverTime) = diag_tickTime;
|
||||
if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > 0.25}) then {
|
||||
GVAR(startHoverTime) = ACE_diagTime;
|
||||
GVAR(lastPath) = _hoverPath;
|
||||
GVAR(expanded) = false;
|
||||
} else {
|
||||
if(!GVAR(expanded) && diag_tickTime-GVAR(startHoverTime) > 0.25) then {
|
||||
if(!GVAR(expanded) && ACE_diagTime-GVAR(startHoverTime) > 0.25) then {
|
||||
GVAR(expanded) = true;
|
||||
|
||||
// Start the expanding menu animation only if the user is not going up the menu
|
||||
if !([GVAR(menuDepthPath),GVAR(lastPath)] call FUNC(isSubPath)) then {
|
||||
GVAR(expandedTime) = diag_tickTime;
|
||||
GVAR(expandedTime) = ACE_diagTime;
|
||||
};
|
||||
GVAR(menuDepthPath) = +GVAR(lastPath);
|
||||
|
||||
|
@ -25,7 +25,7 @@ _fnc_renderNearbyActions = {
|
||||
#define MAXINTERACTOBJECTS 3
|
||||
|
||||
GVAR(foundActions) = [];
|
||||
GVAR(lastTimeSearchedActions) = diag_tickTime;
|
||||
GVAR(lastTimeSearchedActions) = ACE_diagTime;
|
||||
|
||||
_numInteractObjects = 0;
|
||||
_nearestObjects = nearestObjects [ACE_player, ["All"], 13];
|
||||
@ -125,7 +125,7 @@ GVAR(collectedActionPoints) resize 0;
|
||||
if (GVAR(openedMenuType) == 0) then {
|
||||
|
||||
if (vehicle ACE_player == ACE_player) then {
|
||||
if (diag_tickTime > GVAR(lastTimeSearchedActions) + 0.20) then {
|
||||
if (ACE_diagTime > GVAR(lastTimeSearchedActions) + 0.20) then {
|
||||
// Once every 0.2 secs, collect nearby objects active and visible action points and render them
|
||||
call _fnc_renderNearbyActions;
|
||||
} else {
|
||||
|
@ -102,8 +102,8 @@ if (GVAR(UseListMenu)) then {
|
||||
|
||||
// Animate menu scale
|
||||
if (_menuInSelectedPath && (_menuDepth == count _path)) then {
|
||||
_scaleX = _scaleX * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * 8) min 1));
|
||||
_scaleY = _scaleY * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * 8) min 1));
|
||||
_scaleX = _scaleX * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * 8) min 1));
|
||||
_scaleY = _scaleY * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * 8) min 1));
|
||||
};
|
||||
|
||||
_target = _actionObject;
|
||||
|
@ -46,7 +46,7 @@ playSound "ACE_Sound_Click";
|
||||
_phase = _house animationPhase (_animations select 0);
|
||||
_position = getPosASL ACE_player;
|
||||
|
||||
_time = time + 0.2;
|
||||
_time = ACE_time + 0.2;
|
||||
_usedMouseWheel = false;
|
||||
waitUntil {
|
||||
if (inputAction "PrevAction" > 0 || {inputAction "NextAction" > 0}) then {
|
||||
@ -61,7 +61,7 @@ playSound "ACE_Sound_Click";
|
||||
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
|
||||
};
|
||||
|
||||
if (!_usedMouseWheel && {time < _time} && {[ACE_player, objNull, []] call EFUNC(common,canInteractWith)}) then {
|
||||
if (!_usedMouseWheel && {ACE_time < _time} && {[ACE_player, objNull, []] call EFUNC(common,canInteractWith)}) then {
|
||||
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
|
||||
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
|
@ -20,7 +20,7 @@ _currentShooter = (vehicle ACE_player);
|
||||
_args = uiNamespace getVariable[QGVAR(arguments), [] ];
|
||||
if( (count _args) > 0) then {
|
||||
_lastTick = _args select 0;
|
||||
if(diag_tickTime - _lastTick > 1) then {
|
||||
if(ACE_diagTime - _lastTick > 1) then {
|
||||
[] call FUNC(onOpticLoad);
|
||||
};
|
||||
};
|
||||
@ -170,12 +170,12 @@ if (isNull _newTarget) then {
|
||||
// Lock on after 3 seconds
|
||||
if(_currentTarget != _newTarget) then {
|
||||
TRACE_1("New Target, reseting locking", _newTarget);
|
||||
_lockTime = diag_tickTime;
|
||||
_lockTime = ACE_diagTime;
|
||||
_currentTarget = _newTarget;
|
||||
|
||||
playSound "ACE_Javelin_Locking";
|
||||
} else {
|
||||
if(diag_tickTime - _lockTime > __LOCKONTIME + _randomLockInterval) then {
|
||||
if(ACE_diagTime - _lockTime > __LOCKONTIME + _randomLockInterval) then {
|
||||
TRACE_2("LOCKED!", _currentTarget, _lockTime);
|
||||
|
||||
__JavelinIGUISeek ctrlSetTextColor __ColorGreen;
|
||||
@ -217,9 +217,9 @@ if (isNull _newTarget) then {
|
||||
// Allow fire
|
||||
_fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
|
||||
|
||||
if(diag_tickTime > _soundTime) then {
|
||||
if(ACE_diagTime > _soundTime) then {
|
||||
playSound "ACE_Javelin_Locked";
|
||||
_soundTime = diag_tickTime + 0.25;
|
||||
_soundTime = ACE_diagTime + 0.25;
|
||||
};
|
||||
} else {
|
||||
__JavelinIGUITargeting ctrlShow true;
|
||||
@ -251,9 +251,9 @@ if (isNull _newTarget) then {
|
||||
|
||||
{_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL,__JavelinIGUITargetingGateTR,__JavelinIGUITargetingGateBL,__JavelinIGUITargetingGateBR];
|
||||
|
||||
if(diag_tickTime > _soundTime) then {
|
||||
if(ACE_diagTime > _soundTime) then {
|
||||
playSound "ACE_Javelin_Locking";
|
||||
_soundTime = diag_tickTime + 0.25;
|
||||
_soundTime = ACE_diagTime + 0.25;
|
||||
};
|
||||
// Disallow fire
|
||||
_fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire);
|
||||
@ -280,7 +280,7 @@ if (isNull _newTarget) then {
|
||||
//TRACE_2("", _newTarget, _currentTarget);
|
||||
|
||||
// Save arguments for next run
|
||||
_args set[0, diag_tickTime];
|
||||
_args set[0, ACE_diagTime];
|
||||
_args set[1, _currentTarget];
|
||||
_args set[2, _runTime];
|
||||
_args set[3, _lockTime];
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
TRACE_1("enter", _this);
|
||||
|
||||
#define __LOCKONTIMERANDOM 2 // Deviation in lock on time
|
||||
#define __LOCKONTIMERANDOM 2 // Deviation in lock on ACE_time
|
||||
|
||||
if((count _this) > 0) then {
|
||||
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
|
||||
@ -25,7 +25,7 @@ uiNameSpace setVariable [QGVAR(arguments),
|
||||
0, // Run Time
|
||||
0, // Lock Time
|
||||
0, // Sound timer
|
||||
(random __LOCKONTIMERANDOM), // random lock time addition
|
||||
(random __LOCKONTIMERANDOM), // random lock ACE_time addition
|
||||
-1
|
||||
]
|
||||
];
|
||||
|
@ -11,7 +11,7 @@ GVAR(MinAvgMax) = false;
|
||||
GVAR(MinAvgMaxMode) = 0;
|
||||
GVAR(referenceHeadingMenu) = 0;
|
||||
GVAR(referenceHeadingAutoSet) = true;
|
||||
GVAR(manualSetCooldown) = diag_tickTime;
|
||||
GVAR(manualSetCooldown) = ACE_diagTime;
|
||||
GVAR(headingSetDisplayTimer) = 0;
|
||||
|
||||
GVAR(Menu) = 1;
|
||||
|
@ -33,12 +33,12 @@ switch (_this) do {
|
||||
case 2: { // Auto set
|
||||
GVAR(RefHeading) = (getDir ACE_player) % 360;
|
||||
GVAR(referenceHeadingMenu) = 0;
|
||||
GVAR(headingSetDisplayTimer) = diag_tickTime;
|
||||
GVAR(headingSetDisplayTimer) = ACE_diagTime;
|
||||
};
|
||||
case 3: { // Manual set
|
||||
GVAR(RefHeading) = GVAR(TmpHeading);
|
||||
GVAR(referenceHeadingMenu) = 0;
|
||||
GVAR(headingSetDisplayTimer) = diag_tickTime;
|
||||
GVAR(headingSetDisplayTimer) = ACE_diagTime;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -73,13 +73,13 @@ switch (_this) do {
|
||||
GVAR(MinAvgMax) = !GVAR(MinAvgMax);
|
||||
} else {
|
||||
if (GVAR(referenceHeadingMenu) == 3) then {
|
||||
if (diag_tickTime - GVAR(manualSetCooldown) < 0.2) then {
|
||||
if (ACE_diagTime - GVAR(manualSetCooldown) < 0.2) then {
|
||||
GVAR(TmpHeading) = GVAR(TmpHeading) - 10;
|
||||
} else {
|
||||
GVAR(TmpHeading) = GVAR(TmpHeading) - 1;
|
||||
};
|
||||
GVAR(TmpHeading) = (GVAR(TmpHeading) + 360) % 360;
|
||||
GVAR(manualSetCooldown) = diag_tickTime;
|
||||
GVAR(manualSetCooldown) = ACE_diagTime;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -88,13 +88,13 @@ switch (_this) do {
|
||||
GVAR(MinAvgMax) = !GVAR(MinAvgMax);
|
||||
} else {
|
||||
if (GVAR(referenceHeadingMenu) == 3) then {
|
||||
if (diag_tickTime - GVAR(manualSetCooldown) < 0.2) then {
|
||||
if (ACE_diagTime - GVAR(manualSetCooldown) < 0.2) then {
|
||||
GVAR(TmpHeading) = GVAR(TmpHeading) + 10;
|
||||
} else {
|
||||
GVAR(TmpHeading) = GVAR(TmpHeading) + 1;
|
||||
};
|
||||
GVAR(TmpHeading) = (GVAR(TmpHeading) + 360) % 360;
|
||||
GVAR(manualSetCooldown) = diag_tickTime;
|
||||
GVAR(manualSetCooldown) = ACE_diagTime;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -58,8 +58,8 @@ GVAR(Overlay) = true;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (diag_tickTime > GVAR(updateTimer)) then {
|
||||
GVAR(updateTimer) = diag_tickTime + 1;
|
||||
if (ACE_diagTime > GVAR(updateTimer)) then {
|
||||
GVAR(updateTimer) = ACE_diagTime + 1;
|
||||
|
||||
private ["_outputData"];
|
||||
_outputData = [] call FUNC(generateOutputData);
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (diag_tickTime - GVAR(headingSetDisplayTimer) < 0.8) exitWith {["", "", " Heading Set", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]};
|
||||
if (ACE_diagTime - GVAR(headingSetDisplayTimer) < 0.8) exitWith {["", "", " Heading Set", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]};
|
||||
|
||||
private ["_playerDir", "_playerAltitude", "_temperature", "_humidity", "_barometricPressure", "_chill", "_heatIndex", "_dewPoint", "_wetBulb", "_fnc_dayOfWeek", "_dayString", "_monthString", "_windSpeed", "_windDir", "_textTop", "_textCenterBig", "_textCenter", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_textBottomBig", "_textCenterLine1", "_textCenterLine2", "_textCenterLine3", "_textCenterLine4", "_textCenterLine5", "_textCenterLine6"];
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_uuid", "_args"];
|
||||
_uuid = format["%1%2%3", floor diag_tickTime, floor random 1000, floor random 10000];
|
||||
_uuid = format["%1%2%3", floor ACE_diagTime, floor random 1000, floor random 10000];
|
||||
_args = [_uuid, _this];
|
||||
["laser_laserOn", _args] call EFUNC(common,globalEvent);
|
||||
_uuid;
|
||||
|
@ -32,7 +32,7 @@ FUNC(laserHudDesignatePFH) = {
|
||||
};
|
||||
|
||||
if( (count _args) < 4) then {
|
||||
_args set[3, diag_tickTime + FCS_UPDATE_DELAY];
|
||||
_args set[3, ACE_diagTime + FCS_UPDATE_DELAY];
|
||||
};
|
||||
_forceUpdateTime = _args select 3;
|
||||
|
||||
@ -57,9 +57,9 @@ FUNC(laserHudDesignatePFH) = {
|
||||
};
|
||||
*/
|
||||
|
||||
if(diag_tickTime > _forceUpdateTime) then {
|
||||
if(ACE_diagTime > _forceUpdateTime) then {
|
||||
["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent;
|
||||
_args set[3, diag_tickTime + FCS_UPDATE_DELAY];
|
||||
_args set[3, ACE_diagTime + FCS_UPDATE_DELAY];
|
||||
};
|
||||
|
||||
_this set[0, _args];
|
||||
|
@ -9,7 +9,7 @@
|
||||
* 2: Magazine is a belt <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Array in format [time, isBullet, array of ammo counts] <ARRAY>
|
||||
* Array in format [ACE_time, isBullet, array of ammo counts] <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [10, [1,2,3,8], false] call ace_magazinerepack_fnc_simulateRepackEvents =
|
||||
|
@ -13,7 +13,7 @@ call FUNC(determineZoom);
|
||||
waitUntil {(!isNull findDisplay 12)};
|
||||
|
||||
GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||
GVAR(lastStillTime) = time;
|
||||
GVAR(lastStillTime) = ACE_time;
|
||||
GVAR(isShaking) = false;
|
||||
|
||||
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}];
|
||||
|
@ -26,7 +26,7 @@ _fnc_blendColor = {
|
||||
(_c1 select 3) * (1 - _alpha) + (_c2 select 3) * _alpha]
|
||||
};
|
||||
|
||||
// Ambient light tint depending on time of day
|
||||
// Ambient light tint depending on ACE_time of day
|
||||
_lightTint = switch (true) do {
|
||||
case (sunOrMoon == 1.0) : { [0.5,0.5,0.5,1] };
|
||||
case (sunOrMoon > 0.80) : {[[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8)/0.2] call _fnc_blendColor};
|
||||
|
@ -46,8 +46,8 @@ if (GVAR(mapShake)) then {
|
||||
_amplitude = (_speed - 0.1) / 5 * (1000 * _mapScale);
|
||||
_time = 0.1;
|
||||
|
||||
_shakePos = [(GVAR(lastStillPosition) select 0) + sin((time + _time - GVAR(lastStillTime))*100) * _amplitude * 0.25,
|
||||
(GVAR(lastStillPosition) select 1) + sin((time + _time - GVAR(lastStillTime))*260) * _amplitude];
|
||||
_shakePos = [(GVAR(lastStillPosition) select 0) + sin((ACE_time + _time - GVAR(lastStillTime))*100) * _amplitude * 0.25,
|
||||
(GVAR(lastStillPosition) select 1) + sin((ACE_time + _time - GVAR(lastStillTime))*260) * _amplitude];
|
||||
|
||||
_mapCtrl ctrlMapAnimAdd [_time, _mapScale, _shakePos];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
@ -64,7 +64,7 @@ if (GVAR(mapShake)) then {
|
||||
// The map is still, store state
|
||||
ctrlMapAnimClear _mapCtrl;
|
||||
GVAR(lastStillPosition) = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
||||
GVAR(lastStillTime) = time;
|
||||
GVAR(lastStillTime) = ACE_time;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ GVAR(effectPainCC) = [
|
||||
|
||||
// Initialize Other Variables
|
||||
GVAR(effectBlind) = false;
|
||||
GVAR(effectTimeBlood) = time;
|
||||
GVAR(effectTimeBlood) = ACE_time;
|
||||
|
||||
// MAIN EFFECTS LOOP
|
||||
[{
|
||||
@ -133,8 +133,8 @@ GVAR(effectTimeBlood) = time;
|
||||
|
||||
_bleeding = [ACE_player] call FUNC(getBloodLoss);
|
||||
// Bleeding Indicator
|
||||
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < time) then {
|
||||
GVAR(effectTimeBlood) = time;
|
||||
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < ACE_time) then {
|
||||
GVAR(effectTimeBlood) = ACE_time;
|
||||
[600 * _bleeding] call BIS_fnc_bloodEffect;
|
||||
};
|
||||
|
||||
@ -150,8 +150,8 @@ GVAR(effectTimeBlood) = time;
|
||||
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
GVAR(lastHeartBeat) = time;
|
||||
GVAR(lastHeartBeatSound) = time;
|
||||
GVAR(lastHeartBeat) = ACE_time;
|
||||
GVAR(lastHeartBeatSound) = ACE_time;
|
||||
|
||||
// HEARTRATE BASED EFFECTS
|
||||
[{
|
||||
@ -164,8 +164,8 @@ GVAR(lastHeartBeatSound) = time;
|
||||
if (_heartRate <= 0) exitwith {};
|
||||
_interval = 60 / (_heartRate min 50);
|
||||
|
||||
if (time > GVAR(lastHeartBeat) + _interval) then {
|
||||
GVAR(lastHeartBeat) = time;
|
||||
if (ACE_time > GVAR(lastHeartBeat) + _interval) then {
|
||||
GVAR(lastHeartBeat) = ACE_time;
|
||||
|
||||
// Pain effect
|
||||
_strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0;
|
||||
@ -219,8 +219,8 @@ GVAR(lastHeartBeatSound) = time;
|
||||
|
||||
if (GVAR(level) >= 2 && {_heartRate > 0}) then {
|
||||
_minTime = 60 / _heartRate;
|
||||
if (time - GVAR(lastHeartBeatSound) > _minTime) then {
|
||||
GVAR(lastHeartBeatSound) = time;
|
||||
if (ACE_time - GVAR(lastHeartBeatSound) > _minTime) then {
|
||||
GVAR(lastHeartBeatSound) = ACE_time;
|
||||
// Heart rate sound effect
|
||||
if (_heartRate < 60) then {
|
||||
_sound = GVAR(heartBeatSounds_Normal) select (random((count GVAR(heartBeatSounds_Normal)) -1));
|
||||
|
@ -13,7 +13,7 @@ if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
|
||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||
};
|
||||
|
||||
// Remove maximum unconsciousness time handler
|
||||
// Remove maximum unconsciousness ACE_time handler
|
||||
_maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1];
|
||||
if (_maxUnconHandle > 0) then {
|
||||
[_maxUnconHandle] call CBA_fnc_removePerFrameHandler;
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Arguments:
|
||||
* 0: The unit <OBJECT>
|
||||
* 1: value <NUMBER>
|
||||
* 2: time in seconds <NUMBER>
|
||||
* 2: ACE_time in seconds <NUMBER>
|
||||
* 3: callback <CODE>
|
||||
*
|
||||
* Return Value:
|
||||
|
@ -29,8 +29,8 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
||||
[{
|
||||
private ["_unit", "_interval"];
|
||||
_unit = (_this select 0) select 0;
|
||||
_interval = time - ((_this select 0) select 1);
|
||||
(_this select 0) set [1, time];
|
||||
_interval = ACE_time - ((_this select 0) select 1);
|
||||
(_this select 0) set [1, ACE_time];
|
||||
|
||||
if (!alive _unit || !local _unit) then {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
@ -54,5 +54,5 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
||||
[_unit, _pain] call FUNC(playInjuredSound);
|
||||
};
|
||||
};
|
||||
}, 1, [_unit, time]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 1, [_unit, ACE_time]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ _amount = 1;
|
||||
private "_info";
|
||||
_info = _log select _foreachIndex;
|
||||
_info set [1,(_info select 1) + 1];
|
||||
_info set [2, time];
|
||||
_info set [2, ACE_time];
|
||||
_log set [_foreachIndex, _info];
|
||||
|
||||
_amount = (_info select 1);
|
||||
@ -39,7 +39,7 @@ _amount = 1;
|
||||
}foreach _log;
|
||||
|
||||
if (!_inList) then {
|
||||
_log pushback [_newItem, 1, time];
|
||||
_log pushback [_newItem, 1, ACE_time];
|
||||
};
|
||||
_unit setvariable [QGVAR(triageCard), _log, true];
|
||||
["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call ace_common_fnc_localEvent;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the time interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre).
|
||||
Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the ACE_time interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre).
|
||||
|
||||
Source: http://en.wikipedia.org/wiki/Cardiac_output
|
||||
*/
|
||||
|
@ -28,12 +28,12 @@ if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
|
||||
} forEach (_oldLitter select 1);
|
||||
};
|
||||
|
||||
GVAR(allCreatedLitter) pushBack [time, [_litterObject]];
|
||||
GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]];
|
||||
|
||||
if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
|
||||
[{
|
||||
{
|
||||
if (time - (_x select 0) >= GVAR(litterCleanUpDelay)) then {
|
||||
if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then {
|
||||
{
|
||||
deleteVehicle _x;
|
||||
} forEach (_x select 1);
|
||||
|
@ -48,7 +48,7 @@ if (GVAR(level) < 2) then {
|
||||
} else {
|
||||
if !([_unit] call FUNC(hasMedicalEnabled)) exitwith {
|
||||
// Because of the config changes, we cannot properly disable the medical system for a unit.
|
||||
// lets use basic for the time being..
|
||||
// lets use basic for the ACE_time being..
|
||||
_damageReturn = _this call FUNC(handleDamage_basic);
|
||||
};
|
||||
_newDamage = _this call FUNC(handleDamage_caching);
|
||||
|
@ -54,7 +54,7 @@ if (diag_frameno > (_unit getVariable [QGVAR(basic_frameNo), -3]) + 2) then {
|
||||
[{
|
||||
private ["_unit", "_damagesum"];
|
||||
_unit = (_this select 0) select 0;
|
||||
if (diag_tickTime - (_unit getvariable [QGVAR(structDamagePFH),-2]) >= 2) then {
|
||||
if (ACE_diagTime - (_unit getvariable [QGVAR(structDamagePFH),-2]) >= 2) then {
|
||||
_unit setVariable [QGVAR(structDamagePFH), nil];
|
||||
_damagesum = (_unit getHitPointDamage "HitHead") +
|
||||
(_unit getHitPointDamage "HitBody") +
|
||||
@ -69,7 +69,7 @@ if (diag_frameno > (_unit getVariable [QGVAR(basic_frameNo), -3]) + 2) then {
|
||||
};
|
||||
}, 0, [_unit]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
_unit setVariable [QGVAR(structDamagePFH), diag_tickTime]; // Assign starting time or reset it
|
||||
_unit setVariable [QGVAR(structDamagePFH), ACE_diagTime]; // Assign starting ACE_time or reset it
|
||||
};
|
||||
|
||||
_newDamage = _damage - (damage _unit);
|
||||
|
@ -26,7 +26,7 @@ if (_local) then {
|
||||
if ((_unit getvariable ["ACE_isUnconscious",false]) && {count (_unit getvariable [QGVAR(unconsciousArguments), []]) >= 6}) then {
|
||||
private "_arguments";
|
||||
_arguments = (_unit getvariable [QGVAR(unconsciousArguments), []]);
|
||||
_arguments set [2, time];
|
||||
_arguments set [2, ACE_time];
|
||||
|
||||
[DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
@ -20,9 +20,9 @@ _interval = _this select 1;
|
||||
if (_interval == 0) exitWith {};
|
||||
|
||||
_lastTimeValuesSynced = _unit getvariable [QGVAR(lastMomentValuesSynced), 0];
|
||||
_syncValues = (time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced));
|
||||
_syncValues = (ACE_time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced));
|
||||
if (_syncValues) then {
|
||||
_unit setvariable [QGVAR(lastMomentValuesSynced), time];
|
||||
_unit setvariable [QGVAR(lastMomentValuesSynced), ACE_time];
|
||||
};
|
||||
|
||||
_bloodVolume = (_unit getvariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange));
|
||||
|
@ -7,7 +7,7 @@
|
||||
* 1: Medication Treatment classname <STRING>
|
||||
* 2: The medication treatment variablename <STRING>
|
||||
* 3: Max dosage <NUMBER>
|
||||
* 4: The time in the system <NUMBER>
|
||||
* 4: The ACE_time in the system <NUMBER>
|
||||
* 5: Incompatable medication <ARRAY<STRING>>
|
||||
*
|
||||
* Return Value:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Play the injured sound for a unit if the unit is damaged. The sound broadcasted across MP.
|
||||
* Will not play if the unit has already played a sound within to close a time frame.
|
||||
* Will not play if the unit has already played a sound within to close a ACE_time frame.
|
||||
* Delay: With minimal damage (below 1), the delay is (10 + random(50)) seconds. Otherwise it is 60 seconds / damage.
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -38,10 +38,10 @@ _timeInCardiacArrest = 120 + round(random(600));
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inCardiacArrest), nil,true];
|
||||
};
|
||||
if (time - _startTime >= _timeInCardiacArrest) exitwith {
|
||||
if (ACE_time - _startTime >= _timeInCardiacArrest) exitwith {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inCardiacArrest), nil,true];
|
||||
[_unit] call FUNC(setDead);
|
||||
};
|
||||
}, 1, [_unit, time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler;
|
||||
}, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
@ -40,7 +40,7 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
|
||||
};
|
||||
|
||||
_unit setvariable [QGVAR(inReviveState), true, true];
|
||||
_unit setvariable [QGVAR(reviveStartTime), time];
|
||||
_unit setvariable [QGVAR(reviveStartTime), ACE_time];
|
||||
[_unit, true] call FUNC(setUnconscious);
|
||||
|
||||
[{
|
||||
@ -49,7 +49,7 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
|
||||
_unit = _args select 0;
|
||||
_startTime = _unit getvariable [QGVAR(reviveStartTime), 0];
|
||||
|
||||
if (time - _startTime > GVAR(maxReviveTime)) exitwith {
|
||||
if (ACE_time - _startTime > GVAR(maxReviveTime)) exitwith {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inReviveState), nil, true];
|
||||
_unit setvariable [QGVAR(reviveStartTime), nil];
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Arguments:
|
||||
* 0: The unit that will be put in an unconscious state <OBJECT>
|
||||
* 1: Set unconsciouns <BOOL> <OPTIONAL>
|
||||
* 2: Minimum unconscious time <NUMBER> <OPTIONAL>
|
||||
* 2: Minimum unconscious ACE_time <NUMBER> <OPTIONAL>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
@ -97,7 +97,7 @@ _anim = [_unit] call EFUNC(common,getDeathAnim);
|
||||
};
|
||||
}, [_unit, _anim], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
_startingTime = time;
|
||||
_startingTime = ACE_time;
|
||||
|
||||
[DFUNC(unconsciousPFH), 0.1, [_unit, _originalPos, _startingTime, _minWaitingTime, false, vehicle _unit isKindOf "ParachuteBase"] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
@ -81,7 +81,7 @@ _resistance = _target getvariable [QGVAR(peripheralResistance), 100];
|
||||
_resistance = _resistance + _viscosityChange;
|
||||
_target setvariable [QGVAR(peripheralResistance), _resistance max 0];
|
||||
|
||||
// Call back to ensure that the medication is decreased over time
|
||||
// Call back to ensure that the medication is decreased over ACE_time
|
||||
[_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage);
|
||||
|
||||
true
|
||||
|
@ -44,9 +44,9 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true];
|
||||
// Tourniquet has been removed
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (time - _time > 120) then {
|
||||
if (ACE_time - _time > 120) then {
|
||||
_target setvariable [QGVAR(pain), (_target getvariable [QGVAR(pain), 0]) + 0.005];
|
||||
};
|
||||
}, 5, [_target, _applyingTo, _part, time] ] call CBA_fnc_addPerFrameHandler;
|
||||
}, 5, [_target, _applyingTo, _part, ACE_time] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
true;
|
||||
|
@ -121,13 +121,13 @@ if (_parachuteCheck) then {
|
||||
};
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
_args set [3, _minWaitingTime - (time - _startingTime)];
|
||||
_args set [3, _minWaitingTime - (ACE_time - _startingTime)];
|
||||
_unit setvariable [QGVAR(unconsciousArguments), _args, true];
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
|
||||
if ((time - _startingTime) >= _minWaitingTime) exitwith {
|
||||
if ((ACE_time - _startingTime) >= _minWaitingTime) exitwith {
|
||||
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
|
||||
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ _seekerParams = _args select 3;
|
||||
_stateParams = _args select 4;
|
||||
|
||||
_lastRunTime = _stateParams select 0;
|
||||
_runtimeDelta = diag_tickTime - _lastRunTime;
|
||||
_runtimeDelta = ACE_diagTime - _lastRunTime;
|
||||
_adjustTime = 1;
|
||||
|
||||
if(accTime > 0) then {
|
||||
@ -100,7 +100,7 @@ _PS setDropInterval 3.0;
|
||||
hintSilent format["d: %1", _distanceToTarget];
|
||||
#endif
|
||||
|
||||
_stateParams set[0, diag_tickTime];
|
||||
_stateParams set[0, ACE_diagTime];
|
||||
|
||||
_args set[4, _stateParams];
|
||||
_this set[0, _args];
|
@ -88,7 +88,7 @@ _args = [_this,
|
||||
getNumber ( _config >> "seekerAccuracy" ),
|
||||
getNumber ( _config >> "seekerMaxRange" )
|
||||
],
|
||||
[ diag_tickTime, [], [] ]
|
||||
[ ACE_diagTime, [], [] ]
|
||||
];
|
||||
|
||||
// Hand off to the guiding unit. We just use local player so local PFH fires for now
|
||||
|
@ -72,7 +72,7 @@ if (_activated && local _logic) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (time - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then {
|
||||
if (ACE_time - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then {
|
||||
_ambianceSounds = _args select 1;
|
||||
_minimalDistance = _args select 2;
|
||||
_maximalDistance = _args select 3;
|
||||
@ -113,11 +113,11 @@ if (_activated && local _logic) then {
|
||||
// If no unit is to close to this position, we will play the sound.
|
||||
if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
|
||||
playSound3D [_ambianceSounds select (round(random((count _ambianceSounds)-1))), ObjNull, false, _newPos, _volume, 1, 1000];
|
||||
_args set [8, time];
|
||||
_args set [8, ACE_time];
|
||||
};
|
||||
};
|
||||
};
|
||||
}, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, time] ] call cba_fnc_addPerFrameHandler;
|
||||
}, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
true;
|
||||
|
@ -21,7 +21,7 @@ Example:
|
||||
|
||||
private ["_startTime", "_muzzleVelocity", "_rangeToHit", "_airFriction", "_vacElevation", "_radicand", "_maxElev", "_minElev", "_error", "_solutionElevation", "_lastTestResult", "_numberOfAttempts", "_lineElevation", "_lineTimeOfFlight", "_lineHeightElevation", "_lineHeightTimeDelta", "_lineCrosswindDeg", "_lineHeadwindMeters", "_lineTailWindMeters", "_result"];
|
||||
|
||||
_startTime = diag_tickTime;
|
||||
_startTime = ACE_diagTime;
|
||||
|
||||
_muzzleVelocity = _this select 0;
|
||||
_rangeToHit = _this select 1;
|
||||
@ -74,6 +74,6 @@ _lineAirDensDec = (_rangeToHit - (_lastTestResult select 0)) / 10;
|
||||
_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 1.1, 0, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
|
||||
_lineAirDensInc = (_rangeToHit - (_lastTestResult select 0)) / 10;
|
||||
|
||||
// systemChat format ["debug: Range %1 - in %2 sec", _rangeToHit, (diag_tickTime - _startTime)];
|
||||
// systemChat format ["debug: Range %1 - in %2 sec", _rangeToHit, (ACE_diagTime - _startTime)];
|
||||
|
||||
[_rangeToHit, _lineElevation, _lineHeightElevation, _lineHeightTimeDelta, _lineTimeOfFlight, _lineCrosswindDeg, _lineHeadwindMeters, _lineTailWindMeters, _lineTempDec, _lineTempInc, _lineAirDensDec, _lineAirDensInc]
|
||||
|
@ -51,5 +51,5 @@ while {(_numberOfAttempts < MAX_ATTEMPTS) && {(abs _error) > 0.2}} do {
|
||||
};
|
||||
if (_numberOfAttempts >= MAX_ATTEMPTS) exitWith {[]};
|
||||
|
||||
//return the elevation and time required
|
||||
//return the elevation and ACE_time required
|
||||
[_solutionElevation, (_lastTestResult select 1)]
|
||||
|
@ -45,7 +45,7 @@ _currentVelocity = [0, (_muzzleVelocity * cos _angleDeg), (_muzzleVelocity * sin
|
||||
_currentTime = 0;
|
||||
_lastPos = _currentPos;
|
||||
|
||||
_kCoefficent = -1 * _relDensity * _airFriction; //save time in the loop and compute once
|
||||
_kCoefficent = -1 * _relDensity * _airFriction; //save ACE_time in the loop and compute once
|
||||
|
||||
while {((_currentVelocity select 2) > 0) || ((_currentPos select 2) >= _heightOfTarget)} do {
|
||||
_lastPos = _currentPos;
|
||||
@ -64,7 +64,7 @@ _linConversion = linearConversion [(_lastPos select 2), (_currentPos select 2),
|
||||
_middlePos = (_lastPos vectorMultiply (1 - _linConversion)) vectorAdd (_currentPos vectorMultiply (_linConversion));
|
||||
// _middlePosOld = (_lastPos vectorAdd _currentPos) vectorMultiply 0.5;
|
||||
|
||||
//Same to find travel time
|
||||
//Same to find travel ACE_time
|
||||
_middleTotalTravelTime = _currentTime - (_timeStep * (1-_linConversion));
|
||||
|
||||
//Find shot offset (from crosswind), in degrees
|
||||
|
@ -70,8 +70,8 @@ if (_newMuzzleVelocityCoefficent != 1) then {
|
||||
[_pfID] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_deltaT = time - _time;
|
||||
_args set[2, time];
|
||||
_deltaT = ACE_time - _time;
|
||||
_args set[2, ACE_time];
|
||||
|
||||
_bulletVelocity = velocity _shell;
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
@ -85,4 +85,4 @@ if (_newMuzzleVelocityCoefficent != 1) then {
|
||||
|
||||
_shell setVelocity _bulletVelocity;
|
||||
|
||||
}, 0, [_projectile, MK6_82mm_AIR_FRICTION, time, _relativeDensity]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0, [_projectile, MK6_82mm_AIR_FRICTION, ACE_time, _relativeDensity]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -14,7 +14,7 @@ GVAR(ShowNamesTime) = -10;
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
GVAR(ShowNamesTime) = time;
|
||||
GVAR(ShowNamesTime) = ACE_time;
|
||||
if (call FUNC(canShow)) then{ call FUNC(doShow); };
|
||||
// Return false so it doesn't block other actions
|
||||
false
|
||||
|
@ -31,8 +31,8 @@ private ["_height", "_position", "_color", "_name", "_rank", "_size", "_icon"];
|
||||
|
||||
PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType);
|
||||
|
||||
if (_alpha < 0) exitWith {}; //Don't waste time if not visable
|
||||
if (_iconType == ICON_NONE) exitWith {}; //Don't waste time if not visable
|
||||
if (_alpha < 0) exitWith {}; //Don't waste ACE_time if not visable
|
||||
if (_iconType == ICON_NONE) exitWith {}; //Don't waste ACE_time if not visable
|
||||
|
||||
|
||||
//Set Text:
|
||||
|
@ -6,7 +6,7 @@ private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon",
|
||||
if (!alive ACE_player) exitWith {};
|
||||
|
||||
_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
|
||||
2 + (GVAR(ShowNamesTime) - time); //after release 1 second of full opacity, 1 second of fading to 0
|
||||
2 + (GVAR(ShowNamesTime) - ACE_time); //after release 1 second of full opacity, 1 second of fading to 0
|
||||
} else {
|
||||
1
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ if (!hasInterface) exitWith {};
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common.
|
||||
// camera has to be re-created every ACE_time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common.
|
||||
["activeCameraChanged", {
|
||||
if !(_this select 1) then {
|
||||
deleteVehicle GVAR(camera);
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
EXPLODE_3_PVT(_this,_temperature,_barrelMass,_totalTime);
|
||||
|
||||
// If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool
|
||||
// If a long ACE_time passed since the last shot, there's no need to calculate anything; the weapon should be cool
|
||||
if (_totalTime > 1800) exitWith {0};
|
||||
|
||||
private ["_barrelSurface", "_time", "_deltaTime"];
|
||||
|
@ -26,12 +26,12 @@ _time = _overheat select 1;
|
||||
_barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;
|
||||
|
||||
// Calculate cooling
|
||||
_temperature = [_temperature, _barrelMass, time - _time] call FUNC(cooldown);
|
||||
_temperature = [_temperature, _barrelMass, ACE_time - _time] call FUNC(cooldown);
|
||||
|
||||
//["Overheating", _temperature, {format ["Temperature: %1 °C", _this]}] call EFUNC(common,log);
|
||||
|
||||
// Store new temperature
|
||||
_time = time;
|
||||
_time = ACE_time;
|
||||
_player setVariable [_string, [_temperature, _time], false];
|
||||
|
||||
|
||||
|
@ -44,12 +44,12 @@ _energyIncrement = 0.75 * 0.0005 * _bulletMass * (vectorMagnitudeSqr _velocity);
|
||||
_barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;
|
||||
|
||||
// Calculate cooling
|
||||
_temperature = [_temperature, _barrelMass, time - _time] call FUNC(cooldown);
|
||||
_temperature = [_temperature, _barrelMass, ACE_time - _time] call FUNC(cooldown);
|
||||
// Calculate heating
|
||||
_temperature = _temperature + _energyIncrement / (_barrelMass * 466); // Steel Heat Capacity = 466 J/(Kg.K)
|
||||
|
||||
// set updated values
|
||||
_time = time;
|
||||
_time = ACE_time;
|
||||
_unit setVariable [_variableName, [_temperature, _time], false];
|
||||
_scaledTemperature = (_temperature / 1000) min 1 max 0;
|
||||
|
||||
|
@ -19,8 +19,8 @@ _unit = _this select 0;
|
||||
GVAR(PFH) = false;
|
||||
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
|
||||
[{
|
||||
if (time >= ((_this select 0) select 0) + 1) then {
|
||||
if (ACE_time >= ((_this select 0) select 0) + 1) then {
|
||||
((_this select 0) select 1) playActionNow "Crouch";
|
||||
[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
};
|
||||
}, 1, [time,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler);
|
||||
}, 1, [ACE_time,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler);
|
||||
|
@ -39,7 +39,7 @@ GVAR(AltimeterActive) = true;
|
||||
_minute = floor ((daytime - _hour) * 60);
|
||||
|
||||
_height = (getPosASL _unit) select 2;
|
||||
_curTime = time;
|
||||
_curTime = ACE_time;
|
||||
_timeDiff = _curTime - _prevTime;
|
||||
_descentRate = if(_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0};
|
||||
|
||||
@ -49,4 +49,4 @@ GVAR(AltimeterActive) = true;
|
||||
|
||||
(_this select 0) set [2, _height];
|
||||
(_this select 0) set [3, _curTime];
|
||||
}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), time]] call CALLSTACK(cba_fnc_addPerFrameHandler);
|
||||
}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(cba_fnc_addPerFrameHandler);
|
||||
|
@ -21,5 +21,5 @@ _target selectWeapon _weapon;
|
||||
if (currentWeapon _target != _weapon) exitWith {};
|
||||
if (currentMagazine _target != "") exitWith {};
|
||||
|
||||
// command is wip, reload time for launchers is not intended.
|
||||
// command is wip, reload ACE_time for launchers is not intended.
|
||||
_target addWeaponItem [_weapon, _magazine];
|
||||
|
@ -40,15 +40,15 @@ _horizontal = _display displayCtrl 13;
|
||||
_vertical ctrlSetText (str (_zeroing select 0));
|
||||
_horizontal ctrlSetText (str (_zeroing select 1));
|
||||
|
||||
// Set the time when to hide the knobs
|
||||
GVAR(timeToHide) = diag_tickTime + 3.0;
|
||||
// Set the ACE_time when to hide the knobs
|
||||
GVAR(timeToHide) = ACE_diagTime + 3.0;
|
||||
|
||||
if !(isNil QGVAR(fadePFH)) exitWith {};
|
||||
|
||||
// Launch a PFH to wait and fade out the knobs
|
||||
GVAR(fadePFH) = [{
|
||||
|
||||
if (diag_tickTime >= GVAR(timeToHide)) exitWith {
|
||||
if (ACE_diagTime >= GVAR(timeToHide)) exitWith {
|
||||
private "_layer";
|
||||
_layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
|
||||
_layer cutFadeOut 2;
|
||||
|
@ -40,19 +40,19 @@ switch (_this select 0) do {
|
||||
|
||||
// handle input in option menu
|
||||
if (GVAR(currentMode) == "settings") exitWith {
|
||||
if (diag_tickTime < GVAR(keyDownTimeMenu) + 1) exitWith {};
|
||||
if (ACE_diagTime < GVAR(keyDownTimeMenu) + 1) exitWith {};
|
||||
|
||||
if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
if (ACE_diagTime < GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
GVAR(keyDownTabCountAzimuth) = (GETGVAR(keyDownTabCountAzimuth,0)) + 1;
|
||||
} else {
|
||||
GVAR(keyDownTabCountAzimuth) = 1;
|
||||
};
|
||||
|
||||
GVAR(keyDownTimeAzimuth) = diag_tickTime;
|
||||
GVAR(keyDownTimeAzimuth) = ACE_diagTime;
|
||||
};
|
||||
|
||||
if (GVAR(currentMode) == "config") exitWith {
|
||||
if (diag_tickTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {};
|
||||
if (ACE_diagTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {};
|
||||
|
||||
["config"] call FUNC(nextMode);
|
||||
};
|
||||
@ -66,30 +66,30 @@ switch (_this select 0) do {
|
||||
[false] call FUNC(showP1);
|
||||
|
||||
// handle 5 times clicking
|
||||
if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
if (ACE_diagTime < GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
GVAR(keyDownTabCountAzimuth) = (GETGVAR(keyDownTabCountAzimuth,0)) + 1;
|
||||
GVAR(keyDownTimeAzimuth) = diag_tickTime;
|
||||
GVAR(keyDownTimeAzimuth) = ACE_diagTime;
|
||||
} else {
|
||||
GVAR(keyDownTabCountAzimuth) = 1;
|
||||
};
|
||||
|
||||
// open settings menu
|
||||
if (GVAR(keyDownTabCountAzimuth) == 5) exitWith {
|
||||
GVAR(keyDownTimeMenu) = diag_tickTime;
|
||||
GVAR(keyDownTimeAzimuth) = diag_tickTime;
|
||||
GVAR(keyDownTimeMenu) = ACE_diagTime;
|
||||
GVAR(keyDownTimeAzimuth) = ACE_diagTime;
|
||||
GVAR(keyDownTabCountAzimuth) = 0;
|
||||
GVAR(configTemp) = [GVAR(useFeet), GVAR(useMil)];
|
||||
["settings"] call FUNC(showText);
|
||||
"settings" call _fnc_setPFH;
|
||||
};
|
||||
|
||||
if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) exitWith {
|
||||
if (ACE_diagTime < GVAR(keyDownTimeAzimuth) + 0.5) exitWith {
|
||||
"azimuth+inclination" call _fnc_setPFH;
|
||||
};
|
||||
|
||||
GVAR(keyDownTimeAzimuth) = diag_tickTime;
|
||||
GVAR(keyDownTimeAzimuth) = ACE_diagTime;
|
||||
|
||||
if (diag_tickTime > GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
if (ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
if !(GETGVAR(isKeyDownDistance,false)) then {
|
||||
["distance"] call FUNC(clearDisplay);
|
||||
"azimuth" call _fnc_setPFH;
|
||||
@ -110,19 +110,19 @@ switch (_this select 0) do {
|
||||
|
||||
// handle input in option menu
|
||||
if (GVAR(currentMode) == "config") exitWith {
|
||||
if (diag_tickTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {};
|
||||
if (ACE_diagTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {};
|
||||
|
||||
if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
if (ACE_diagTime < GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
GVAR(keyDownTabCountDistance) = (GETGVAR(keyDownTabCountDistance,0)) + 1;
|
||||
} else {
|
||||
GVAR(keyDownTabCountDistance) = 1;
|
||||
};
|
||||
|
||||
GVAR(keyDownTimeDistance) = diag_tickTime;
|
||||
GVAR(keyDownTimeDistance) = ACE_diagTime;
|
||||
};
|
||||
|
||||
if (GVAR(currentMode) == "settings") exitWith {
|
||||
if (diag_tickTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {};
|
||||
if (ACE_diagTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {};
|
||||
|
||||
["settings"] call FUNC(nextMode);
|
||||
};
|
||||
@ -141,30 +141,30 @@ switch (_this select 0) do {
|
||||
[false] call FUNC(showP1);
|
||||
|
||||
// handle 5 times clicking
|
||||
if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
if (ACE_diagTime < GVAR(keyDownTimeDistance) + 0.5) then {
|
||||
GVAR(keyDownTabCountDistance) = (GETGVAR(keyDownTabCountDistance,0)) + 1;
|
||||
GVAR(keyDownTimeDistance) = diag_tickTime;
|
||||
GVAR(keyDownTimeDistance) = ACE_diagTime;
|
||||
} else {
|
||||
GVAR(keyDownTabCountDistance) = 1;
|
||||
};
|
||||
|
||||
// open config menu
|
||||
if (GVAR(keyDownTabCountDistance) == 5) exitWith {
|
||||
GVAR(keyDownTimeMenu) = diag_tickTime;
|
||||
GVAR(keyDownTimeDistance) = diag_tickTime;
|
||||
GVAR(keyDownTimeMenu) = ACE_diagTime;
|
||||
GVAR(keyDownTimeDistance) = ACE_diagTime;
|
||||
GVAR(keyDownTabCountDistance) = 0;
|
||||
GVAR(configTemp) = GVAR(modeReticle);
|
||||
["config"] call FUNC(showText);
|
||||
"config" call _fnc_setPFH;
|
||||
};
|
||||
|
||||
if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) exitWith {
|
||||
if (ACE_diagTime < GVAR(keyDownTimeDistance) + 0.5) exitWith {
|
||||
"height+distance" call _fnc_setPFH;
|
||||
};
|
||||
|
||||
GVAR(keyDownTimeDistance) = diag_tickTime;
|
||||
GVAR(keyDownTimeDistance) = ACE_diagTime;
|
||||
|
||||
if (diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
if (ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5) then {
|
||||
if !(GETGVAR(isKeyDownAzimuth,false)) then {
|
||||
["azimuth"] call FUNC(clearDisplay);
|
||||
"distance" call _fnc_setPFH;
|
||||
|
@ -21,7 +21,7 @@ switch (_this select 0) do {
|
||||
case ("azimuth"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.2;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.2;
|
||||
|
||||
[false] call FUNC(showCenter);
|
||||
|
||||
@ -42,7 +42,7 @@ switch (_this select 0) do {
|
||||
case ("distance"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -66,7 +66,7 @@ switch (_this select 0) do {
|
||||
call FUNC(showAzimuth);
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -89,7 +89,7 @@ switch (_this select 0) do {
|
||||
case ("azimuth+inclination"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.2;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.2;
|
||||
|
||||
[false] call FUNC(showCenter);
|
||||
|
||||
@ -110,7 +110,7 @@ switch (_this select 0) do {
|
||||
case ("height+distance"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -132,7 +132,7 @@ switch (_this select 0) do {
|
||||
case ("relative_distance"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -155,7 +155,7 @@ switch (_this select 0) do {
|
||||
case ("relative_height+length"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -178,7 +178,7 @@ switch (_this select 0) do {
|
||||
case ("relative_azimuth+distance"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -201,7 +201,7 @@ switch (_this select 0) do {
|
||||
case ("fall_of_shot"): {
|
||||
|
||||
private "_isReady";
|
||||
_isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
_isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5;
|
||||
|
||||
[_isReady] call FUNC(showCenter);
|
||||
|
||||
@ -223,8 +223,8 @@ switch (_this select 0) do {
|
||||
};
|
||||
|
||||
case ("settings"): {
|
||||
if (diag_tickTime < GVAR(keyDownTimeMenu) + 1) exitWith {
|
||||
GVAR(keyDownTimeAzimuth) = diag_tickTime;
|
||||
if (ACE_diagTime < GVAR(keyDownTimeMenu) + 1) exitWith {
|
||||
GVAR(keyDownTimeAzimuth) = ACE_diagTime;
|
||||
};
|
||||
|
||||
[["meter", "feet"] select (GVAR(configTemp) select 0)] call FUNC(showText);
|
||||
@ -247,7 +247,7 @@ switch (_this select 0) do {
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(keyDownTabCountAzimuth) > 0 && {diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5}) exitWith {
|
||||
if (GVAR(keyDownTabCountAzimuth) > 0 && {ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5}) exitWith {
|
||||
|
||||
["clear_left"] call FUNC(showText);
|
||||
["clear_right"] call FUNC(showText);
|
||||
@ -264,8 +264,8 @@ switch (_this select 0) do {
|
||||
};
|
||||
|
||||
case ("config"): {
|
||||
if (diag_tickTime < GVAR(keyDownTimeMenu) + 1) exitWith {
|
||||
GVAR(keyDownTimeDistance) = diag_tickTime;
|
||||
if (ACE_diagTime < GVAR(keyDownTimeMenu) + 1) exitWith {
|
||||
GVAR(keyDownTimeDistance) = ACE_diagTime;
|
||||
};
|
||||
|
||||
switch (GVAR(configTemp)) do {
|
||||
@ -315,7 +315,7 @@ switch (_this select 0) do {
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(keyDownTabCountDistance) > 0 && {diag_tickTime > GVAR(keyDownTimeDistance) + 0.5}) exitWith {
|
||||
if (GVAR(keyDownTabCountDistance) > 0 && {ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5}) exitWith {
|
||||
|
||||
["clear_left"] call FUNC(showText);
|
||||
["clear_right"] call FUNC(showText);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user