mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into settingsErrorChecking
This commit is contained in:
commit
c91789f3c4
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* 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.
|
||||
* 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.
|
||||
* _this will be [Interval] where 'Interval' is a number.
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: esteldunedain, Jaynus
|
||||
* Returns the result of the function and caches it up to a given ACE_time or event
|
||||
* Returns the result of the function and caches it up to a given time or event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Parameters <ARRAY>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Glowbal, PabstMirror
|
||||
* Get the death animation for the unit at current ACE_time
|
||||
* Get the death animation for the unit at current time
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <OBJECT>
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
|
||||
*
|
||||
* Arguments:
|
||||
* 0: NUMBER - Total Time (in game "ACE_time" seconds)
|
||||
* 0: NUMBER - Total Time (in game "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.
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Author: commy2 and joko // Jonas
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object the variable should be assigned to <OBJECT>
|
||||
* 1: Name of the variable <STRING>
|
||||
* 2: Value of the variable <ANY>
|
||||
* 3: Windup ACE_time <NUMBER> (default: 1)
|
||||
* 3: Windup time <NUMBER> (default: 1)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_unit", "_varName", "_maxDelay"];
|
||||
|
||||
// Create the publish scheduler PFH the first ACE_time
|
||||
// Create the publish scheduler PFH the first time
|
||||
if (isNil QGVAR(publishSchedId)) then {
|
||||
GVAR(publishVarNames) = [];
|
||||
GVAR(publishNextTime) = 1e7;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: esteldunedain
|
||||
* Executes a code once with a given game ACE_time delay, using a PFH
|
||||
* Executes a code once with a given game time delay, using a PFH
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Code to execute <CODE>
|
||||
|
@ -63,7 +63,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 ACE_time (using PFEH system as a queue)
|
||||
//Make sure only one drop operation at a time (using PFEH system as a queue)
|
||||
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(disarmDropItems);
|
||||
|
@ -61,7 +61,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
[_unit, _target, true] call EFUNC(common,claim);
|
||||
|
||||
|
||||
// prevents draging and carrying at the same ACE_time
|
||||
// prevents draging and carrying at the same time
|
||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||
|
||||
// required for aborting animation
|
||||
|
@ -45,7 +45,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
[_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
// prevents draging and carrying at the same ACE_time
|
||||
// prevents draging and carrying at the same time
|
||||
_unit setVariable [QGVAR(isDragging), true, true];
|
||||
|
||||
[FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -31,7 +31,7 @@ if (!alive _target || {_unit distance _target > 10}) then {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame ACE_time.
|
||||
// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame time.
|
||||
if (ACE_time > _timeOut) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* 1: Max range (-1 to ignore) <NUMBER>
|
||||
* 2: Explosive <ARRAY>
|
||||
* 0: Explosive <OBJECT>
|
||||
* 1: Fuse ACE_time <NUMBER>
|
||||
* 1: Fuse time <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
|
@ -75,7 +75,7 @@ if (ACE_time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
|
||||
|
||||
private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"];
|
||||
|
||||
// estimate ACE_time to target
|
||||
// estimate time to target
|
||||
_magazineType = _vehicle currentMagazineTurret _turret;
|
||||
_ammoType = getText (configFile >> "CfgMagazines" >> _magazineType >> "ammo");
|
||||
_initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazineType >> "initSpeed");
|
||||
|
@ -19,7 +19,7 @@ EXPLODE_2_PVT(_this,_params,_pfhId);
|
||||
|
||||
_interval = ACE_time - GVAR(lastUpdateTime);
|
||||
|
||||
// Update the g-forces at constant game ACE_time intervals
|
||||
// Update the g-forces at constant game time intervals
|
||||
if (_interval < INTERVAL) exitWith {};
|
||||
|
||||
if (isNull ACE_player) exitWith {};
|
||||
|
@ -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 ACE_time
|
||||
//PARTIALRECOVERY - start decreasing effect over time
|
||||
[{
|
||||
params ["_strength"];
|
||||
|
||||
|
@ -29,12 +29,9 @@ GVAR(isOpeningDoor) = false;
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
addCamShake [4, 0.5, 5];
|
||||
local _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0));
|
||||
[_message] call FUNC(displayTextStructured);
|
||||
};
|
||||
|
||||
private "_message";
|
||||
_message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0));
|
||||
|
||||
["displayTextStructured", _message] call EFUNC(common,targetEvent);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// restore global fire teams for JIP
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
TRACE_1("enter", _this);
|
||||
|
||||
#define __LOCKONTIMERANDOM 2 // Deviation in lock on ACE_time
|
||||
#define __LOCKONTIMERANDOM 2 // Deviation in lock on time
|
||||
|
||||
if((count _this) > 0) then {
|
||||
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
|
||||
@ -29,7 +29,7 @@ uiNameSpace setVariable [QGVAR(arguments),
|
||||
0, // Run Time
|
||||
0, // Lock Time
|
||||
0, // Sound timer
|
||||
(random __LOCKONTIMERANDOM), // random lock ACE_time addition
|
||||
(random __LOCKONTIMERANDOM), // random lock time addition
|
||||
-1
|
||||
]
|
||||
];
|
||||
|
@ -11,16 +11,16 @@ class CfgVehicles {
|
||||
|
||||
class Land_Net_Fence_4m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Net_Fence_8m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Net_FenceD_8m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_New_WiredFence_5m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_New_WiredFence_10m_Dam_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_New_WiredFence_10m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Pipe_fence_4m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Pipe_fence_4mNoLC_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_SportGround_fence_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Wired_Fence_4m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Wired_Fence_4mD_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Wired_Fence_8m_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Wired_Fence_8mD_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_SportGround_fence_noLC_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Mil_WiredFence_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_IndFnc_Corner_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_IndFnc_9_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_IndFnc_3_Hole_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_IndFnc_3_F: Wall_F { GVAR(isFence) = 1; };
|
||||
class Land_Razorwire_F: NonStrategic { GVAR(isFence) = 1; };
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ TRACE_1("Starting wire-cut action PFEH",_interactionType);
|
||||
if ([_x] call FUNC(isFence)) then {
|
||||
_fencesHelped pushBack _x;
|
||||
_helper = "ACE_LogicDummy" createVehicleLocal (getpos _x);
|
||||
_action = [QGVAR(helperCutFence), (localize LSTRING(CutFence)), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, [0,0,0], 5] call EFUNC(interact_menu,createAction);
|
||||
_action = [QGVAR(helperCutFence), (localize LSTRING(CutFence)), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, {[0,0,0]}, 5.5] call EFUNC(interact_menu,createAction);
|
||||
[_helper, 0, [],_action] call EFUNC(interact_menu,addActionToObject);
|
||||
_helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]);
|
||||
_addedHelpers pushBack _helper;
|
||||
|
@ -19,23 +19,14 @@
|
||||
params ["_object"];
|
||||
TRACE_1("params",_object);
|
||||
|
||||
private ["_typeOf", "_returnValue"];
|
||||
local _typeOf = typeOf _object;
|
||||
|
||||
_typeOf = typeOf _object;
|
||||
_returnValue = false;
|
||||
|
||||
if (_typeOf != "") then {
|
||||
local _returnValue = if (_typeOf != "") then {
|
||||
//If the fence has configEntry we can check it directly
|
||||
_returnValue = (1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence))));
|
||||
(1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence))));
|
||||
} else {
|
||||
//TODO: 1.50 use getModelInfo
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) exitWith {
|
||||
_returnValue = true;
|
||||
};
|
||||
nil
|
||||
} count FENCE_P3DS;
|
||||
//Check the p3d name against list (in script_component.hpp)
|
||||
((getModelInfo _object) select 0) in FENCE_P3DS;
|
||||
};
|
||||
|
||||
_returnValue
|
||||
|
@ -9,7 +9,7 @@
|
||||
* 2: Magazine is a belt <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Array in format [ACE_time, isBullet, array of ammo counts] <ARRAY>
|
||||
* Array in format [time, isBullet, array of ammo counts] <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [10, [1,2,3,8], false] call ace_magazinerepack_fnc_simulateRepackEvents =
|
||||
|
@ -6,22 +6,16 @@ STACK TRACING
|
||||
//#define DEBUG_EVENTS
|
||||
|
||||
#ifdef ENABLE_CALLSTACK
|
||||
#define CALLSTACK(function) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define CALLSTACK_NAMED(function, functionName) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC)
|
||||
|
||||
#define CALLSTACK(function) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define CALLSTACK_NAMED(function, functionName) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC)
|
||||
|
||||
#define FUNC(var1) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define EFUNC(var1,var2) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
|
||||
#define FUNC(var1) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define EFUNC(var1,var2) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#else
|
||||
#define CALLSTACK(function) function
|
||||
#define CALLSTACK_NAMED(function, functionName) function
|
||||
#define DUMPSTACK
|
||||
|
||||
#define FUNC(var1) TRIPLES(ADDON,fnc,var1)
|
||||
#define EFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
|
||||
|
||||
#define CALLSTACK(function) function
|
||||
#define CALLSTACK_NAMED(function, functionName) function
|
||||
#define DUMPSTACK
|
||||
#endif
|
||||
|
||||
|
||||
@ -32,7 +26,7 @@ PERFORMANCE COUNTERS SECTION
|
||||
|
||||
#ifdef ENABLE_PERFORMANCE_COUNTERS
|
||||
#define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret }
|
||||
|
||||
|
||||
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
|
||||
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
|
||||
#define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime];
|
||||
@ -43,4 +37,4 @@ PERFORMANCE COUNTERS SECTION
|
||||
#define BEGIN_COUNTER(x) /* disabled */
|
||||
#define END_COUNTER(x) /* disabled */
|
||||
#define DUMP_COUNTERS /* disabled */
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,17 +1,9 @@
|
||||
#include "\x\cba\addons\main\script_macros_common.hpp"
|
||||
#include "\x\cba\addons\xeh\script_xeh.hpp"
|
||||
|
||||
//Faster Array Unwraping (skips the IS_ARRAY check normaly found in EXPLODE_1_SYS)
|
||||
#undef EXPLODE_2_SYS
|
||||
#define EXPLODE_1_SYS_FAST(ARRAY,A) A =(ARRAY) select 0
|
||||
#define EXPLODE_2_SYS(ARRAY,A,B) EXPLODE_1_SYS_FAST(ARRAY,A); B = (ARRAY) select 1
|
||||
|
||||
// Default versioning level
|
||||
#define DEFAULT_VERSIONING_LEVEL 2
|
||||
|
||||
#define EGVAR(module,var) TRIPLES(PREFIX,module,var)
|
||||
#define QEGVAR(module,var) QUOTE(EGVAR(module,var))
|
||||
|
||||
#define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName)
|
||||
#define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName
|
||||
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
|
||||
@ -22,14 +14,6 @@
|
||||
|
||||
#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)
|
||||
|
||||
#ifndef STRING_MACROS_GUARD
|
||||
#define STRING_MACROS_GUARD
|
||||
#define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1))
|
||||
#define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2))
|
||||
#define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1))
|
||||
#define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2))
|
||||
#endif
|
||||
|
||||
#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)]
|
||||
#define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)]
|
||||
#define SETPVAR_SYS(var1,var2) setVariable [ARR_3(QUOTE(var1),var2,true)]
|
||||
|
@ -5,13 +5,11 @@
|
||||
|
||||
#define MAJOR 3
|
||||
#define MINOR 3
|
||||
#define PATCHLVL 2
|
||||
#define PATCHLVL 3
|
||||
#define BUILD 0
|
||||
|
||||
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
|
||||
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
|
||||
|
||||
#define ACE_TAG A.C.E.
|
||||
|
||||
// MINIMAL required version for the Mod. Components can specify others..
|
||||
#define REQUIRED_VERSION 0.5
|
||||
#define REQUIRED_VERSION 1.52
|
||||
|
@ -26,7 +26,7 @@ _fnc_blendColor = {
|
||||
(_c1 select 3) * (1 - _alpha) + (_c2 select 3) * _alpha]
|
||||
};
|
||||
|
||||
// Ambient light tint depending on ACE_time of day
|
||||
// Ambient light tint depending on 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};
|
||||
|
@ -10,7 +10,7 @@ if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
|
||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||
};
|
||||
|
||||
// Remove maximum unconsciousness ACE_time handler
|
||||
// Remove maximum unconsciousness 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: ACE_time in seconds <NUMBER>
|
||||
* 2: time in seconds <NUMBER>
|
||||
* 3: callback <CODE>
|
||||
*
|
||||
* Return Value:
|
||||
|
@ -7,7 +7,7 @@
|
||||
* 1: Medication Treatment classname <STRING>
|
||||
* 2: The medication treatment variablename <STRING>
|
||||
* 3: Max dosage <NUMBER>
|
||||
* 4: The ACE_time in the system <NUMBER>
|
||||
* 4: The 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 ACE_time frame.
|
||||
* Will not play if the unit has already played a sound within to close a time frame.
|
||||
* Delay: With minimal damage (below 1), the delay is (10 + random(50)) seconds. Otherwise it is 60 seconds / damage.
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Arguments:
|
||||
* 0: The unit that will be put in an unconscious state <OBJECT>
|
||||
* 1: Set unconsciouns <BOOL> (default: true)
|
||||
* 2: Minimum unconscious ACE_time <NUMBER> (default: (round(random(10)+5)))
|
||||
* 2: Minimum unconscious time <NUMBER> (default: (round(random(10)+5)))
|
||||
* 3: Force AI Unconscious (skip random death chance) <BOOL> (default: false)
|
||||
*
|
||||
* ReturnValue:
|
||||
|
@ -84,7 +84,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 ACE_time
|
||||
// Call back to ensure that the medication is decreased over time
|
||||
[_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage);
|
||||
|
||||
true
|
||||
|
@ -51,5 +51,5 @@ while {(_numberOfAttempts < MAX_ATTEMPTS) && {(abs _error) > 0.2}} do {
|
||||
};
|
||||
if (_numberOfAttempts >= MAX_ATTEMPTS) exitWith {[]};
|
||||
|
||||
//return the elevation and ACE_time required
|
||||
//return the elevation and 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 ACE_time in the loop and compute once
|
||||
_kCoefficent = -1 * _relDensity * _airFriction; //save 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 ACE_time
|
||||
//Same to find travel time
|
||||
_middleTotalTravelTime = _currentTime - (_timeStep * (1-_linConversion));
|
||||
|
||||
//Find shot offset (from crosswind), in degrees
|
||||
|
@ -41,7 +41,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then {
|
||||
ACE_LOGINFO("ACRE Detected.");
|
||||
DFUNC(isSpeaking) = {
|
||||
params ["_unit"];
|
||||
(([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||
([_unit] call acre_api_fnc_isSpeaking) && {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||
};
|
||||
} else {
|
||||
if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
EXPLODE_3_PVT(_this,_temperature,_barrelMass,_totalTime);
|
||||
|
||||
// If a long ACE_time passed since the last shot, there's no need to calculate anything; the weapon should be cool
|
||||
// If a long 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"];
|
||||
|
@ -24,9 +24,9 @@ private ["_array", "_type", "_return", "_config" /*, "_priority"*/];
|
||||
|
||||
// get Priority Array from Config
|
||||
_array = [
|
||||
getNumber (configFile >> "CfgWeapons" >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgMagazines" >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgAmmo" >> QGVAR(priority))
|
||||
getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(priority)),
|
||||
getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(priority))
|
||||
];
|
||||
|
||||
TRACE_1("Proiroity Array",_array);
|
||||
|
@ -21,5 +21,5 @@ _target selectWeapon _weapon;
|
||||
if (currentWeapon _target != _weapon) exitWith {};
|
||||
if (currentMagazine _target != "") exitWith {};
|
||||
|
||||
// command is wip, reload ACE_time for launchers is not intended.
|
||||
// command is wip, reload time for launchers is not intended.
|
||||
_target addWeaponItem [_weapon, _magazine];
|
||||
|
@ -44,7 +44,7 @@ _horizontal = _display displayCtrl 13;
|
||||
_vertical ctrlSetText (str _elevation);
|
||||
_horizontal ctrlSetText (str _windage);
|
||||
|
||||
// Set the ACE_time when to hide the knobs
|
||||
// Set the time when to hide the knobs
|
||||
GVAR(timeToHide) = ACE_diagTime + 3.0;
|
||||
|
||||
if !(isNil QGVAR(fadePFH)) exitWith {};
|
||||
|
4
mod.cpp
4
mod.cpp
@ -1,8 +1,8 @@
|
||||
name = "Advanced Combat Environment 3.3.2";
|
||||
name = "Advanced Combat Environment 3.3.3";
|
||||
picture = "logo_ace3_ca.paa";
|
||||
actionName = "GitHub";
|
||||
action = "https://github.com/acemod/ACE3";
|
||||
description = "ACE3 - Version 3.3.2";
|
||||
description = "ACE3 - Version 3.3.3";
|
||||
logo = "logo_ace3_ca.paa";
|
||||
logoOver = "logo_ace3_ca.paa";
|
||||
tooltip = "ACE3";
|
||||
|
@ -199,7 +199,7 @@ Parameters:
|
||||
|
||||
Example:
|
||||
(begin example)
|
||||
ERROR("Value not found","value of frog not found in config ...yada...yada...");
|
||||
ERROR("value of frog not found in config ...yada...yada...");
|
||||
(end)
|
||||
|
||||
Author:
|
||||
@ -674,8 +674,9 @@ Author:
|
||||
Sickboy
|
||||
------------------------------------------- */
|
||||
#define GVAR(var1) DOUBLES(ADDON,var1)
|
||||
#define EGVAR(var1,var2) DOUBLES(DOUBLES(PREFIX,var1),var2)
|
||||
#define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2)
|
||||
#define QGVAR(var1) QUOTE(GVAR(var1))
|
||||
#define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2))
|
||||
|
||||
/* -------------------------------------------
|
||||
Macro: GVARMAIN()
|
||||
@ -694,6 +695,7 @@ Author:
|
||||
Sickboy
|
||||
------------------------------------------- */
|
||||
#define GVARMAIN(var1) GVARMAINS(PREFIX,var1)
|
||||
#define QGVARMAIN(var1) QUOTE(GVARMAIN(var1))
|
||||
// TODO: What's this?
|
||||
#define SETTINGS DOUBLES(PREFIX,settings)
|
||||
#define CREATELOGIC CREATELOGICS(PREFIX,COMPONENT)
|
||||
|
@ -356,5 +356,11 @@ SLX_XEH_STR spawn {
|
||||
*/
|
||||
{ (_x/SLX_XEH_STR_PreInit) call FUNC(init_once) } forEach SLX_XEH_CONFIG_FILES;
|
||||
|
||||
|
||||
XEH_LOG("XEH: PreInit Finished. " + PFORMAT_3("CACHE DISABLED? (Disable caching with cba_cache_disable.pbo)",SLX_XEH_RECOMPILE,CBA_COMPILE_RECOMPILE,CBA_FUNC_RECOMPILE));
|
||||
private "_s";
|
||||
// Normally, full caching is enabled. If not, log an informative message.
|
||||
_s = if (SLX_XEH_RECOMPILE || CBA_COMPILE_RECOMPILE || CBA_FUNC_RECOMPILE) then {
|
||||
PFORMAT_3(" CACHE DISABLED? (Disable caching with cba_cache_disable.pbo)",SLX_XEH_RECOMPILE,CBA_COMPILE_RECOMPILE,CBA_FUNC_RECOMPILE)
|
||||
} else {
|
||||
""
|
||||
};
|
||||
XEH_LOG("XEH: PreInit Finished." + _s);
|
||||
|
@ -40,6 +40,7 @@ local = "_this call SLX_XEH_EH_Local"; \
|
||||
respawn = "_this call SLX_XEH_EH_Respawn"; \
|
||||
put = "_this call SLX_XEH_EH_Put"; \
|
||||
take = "_this call SLX_XEH_EH_Take"; \
|
||||
seatSwitched = "_this call SLX_XEH_EH_SeatSwitched"; \
|
||||
soundPlayed = "_this call SLX_XEH_EH_SoundPlayed"; \
|
||||
weaponAssembled = "_this call SLX_XEH_EH_WeaponAssembled"; \
|
||||
weaponDisAssembled = "_this call SLX_XEH_EH_WeaponDisassembled";
|
||||
@ -51,11 +52,11 @@ weaponDisAssembled = "_this call SLX_XEH_EH_WeaponDisassembled";
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
MACRO: DELETE_EVENTHANDLERS
|
||||
|
||||
Removes all event handlers.
|
||||
|
||||
|
||||
Example:
|
||||
(begin example)
|
||||
class DefaultEventhandlers;
|
||||
@ -103,6 +104,7 @@ delete local; \
|
||||
delete respawn; \
|
||||
delete put; \
|
||||
delete take; \
|
||||
delete seatSwitched; \
|
||||
delete soundPlayed; \
|
||||
delete weaponAssembled; \
|
||||
delete weaponDisAssembled;
|
||||
|
Loading…
Reference in New Issue
Block a user