General - Cleanup spaces in macros (#9769)

Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
This commit is contained in:
PabstMirror 2024-02-05 11:04:24 -06:00 committed by GitHub
parent 6c60b67494
commit a3aef6a066
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
145 changed files with 234 additions and 235 deletions

View File

@ -17,7 +17,7 @@
*/ */
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
if (!(_ammo isKindOf "BulletBase")) exitWith {}; if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (!alive _projectile) exitWith {}; if (!alive _projectile) exitWith {};

View File

@ -22,7 +22,7 @@ private _initStartTime = diag_tickTime;
private _mapSize = worldSize; private _mapSize = worldSize;
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
INFO_1("Terrain already initialized [world: %1]", worldName); INFO_1("Terrain already initialized [world: %1]",worldName);
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized"; systemChat "AdvancedBallistics: Terrain already initialized";
#endif #endif
@ -33,14 +33,14 @@ private _gridCells = _mapGrids * _mapGrids;
GVAR(currentGrid) = 0; GVAR(currentGrid) = 0;
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldName); INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName);
[{ [{
params ["_args","_idPFH"]; params ["_args","_idPFH"];
_args params ["_mapGrids", "_gridCells", "_initStartTime"]; _args params ["_mapGrids", "_gridCells", "_initStartTime"];
if (GVAR(currentGrid) >= _gridCells) exitWith { if (GVAR(currentGrid) >= _gridCells) exitWith {
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", (diag_tickTime - _initStartTime) toFixed 2, worldName); INFO_2("Finished terrain initialization in %1 seconds [world: %2]",(diag_tickTime - _initStartTime) toFixed 2,worldName);
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2]; systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
#endif #endif

View File

@ -66,7 +66,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
if (_inheritedBarrelConfig || _inheritedTempConfig) then { if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig; private _parentConfig = inheritsFrom _ammoConfig;
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed"); private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed); WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig,_parentSpeed);
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
_muzzleVelocityTable = []; _muzzleVelocityTable = [];
_ammoTempMuzzleVelocityShifts = []; _ammoTempMuzzleVelocityShifts = [];

View File

@ -128,7 +128,7 @@ switch (_fillingType) do {
} else { } else {
private _pos = _building select 0; private _pos = _building select 0;
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]); private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]); LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then { if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]); LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
@ -177,7 +177,7 @@ switch (_fillingType) do {
} else { } else {
private _pos = _building select 0; private _pos = _building select 0;
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]); private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]); LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then { if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]); LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
@ -224,7 +224,7 @@ switch (_fillingType) do {
} else { } else {
private _pos = selectRandom _building; private _pos = selectRandom _building;
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]); private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]); LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then { if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]); LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
@ -258,7 +258,7 @@ switch (_fillingType) do {
}; };
}; };
TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)], _teleport); TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)],_teleport);
// Update the unit list and remove duplicate positions and units // Update the unit list and remove duplicate positions and units
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
@ -279,5 +279,5 @@ if (_teleport) then {
[_unitMoveList] call FUNC(garrisonMove); [_unitMoveList] call FUNC(garrisonMove);
}; };
TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left", count _unitsArray, count _buildingsIndex)], _unitsArray); TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left",count _unitsArray,count _buildingsIndex)],_unitsArray);
_unitsArray _unitsArray

View File

@ -81,13 +81,13 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent; [QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
}; };
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]); LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left",count _unitMoveList)]);
}; };
// Check if unit is alive or even existing // Check if unit is alive or even existing
if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then { if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then {
_unitMoveList deleteAt (_unitMoveList find _x); _unitMoveList deleteAt (_unitMoveList find _x);
LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left", count _unitMoveList)]); LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left",count _unitMoveList)]);
} else { } else {
private _unitPos = getPos _unit; private _unitPos = getPos _unit;

View File

@ -28,7 +28,7 @@ _units = _units select {local _x};
private _leader = leader _unit; private _leader = leader _unit;
TRACE_3("fnc_ungarrison: unit and leader",_unit , _leader, (_leader == _unit)); TRACE_3("fnc_ungarrison: unit and leader",_unit,_leader,(_leader == _unit));
_unit setVariable [QGVAR(garrisonned), false, true]; _unit setVariable [QGVAR(garrisonned), false, true];

View File

@ -38,13 +38,13 @@ call FUNC(compileActions);
// Skip if not allowed in editor and in editor // Skip if not allowed in editor and in editor
if (is3DEN && {_scopeEditor != 2}) exitWith { if (is3DEN && {_scopeEditor != 2}) exitWith {
TRACE_1("Skipping action because in editor", _rootClass); TRACE_1("Skipping action because in editor",_rootClass);
[] []
}; };
// Class can't contain ~, because it's used for formatting result // Class can't contain ~, because it's used for formatting result
if ("~" in _rootClass) exitWith { if ("~" in _rootClass) exitWith {
TRACE_1("Classname can't contain '~'", _rootClass); TRACE_1("Classname can't contain '~'",_rootClass);
[] []
}; };
@ -65,7 +65,7 @@ private _fnc_addToGroup = {
// Don't allow two of the same class // Don't allow two of the same class
if (_group findIf {(_x select 0) == _class} != -1) then { if (_group findIf {(_x select 0) == _class} != -1) then {
TRACE_1("An action with this ID already exists", _class); TRACE_1("An action with this ID already exists",_class);
continue; continue;
}; };

View File

@ -72,7 +72,7 @@ private _fnc_addToTabs = {
_currentTab pushBack _sort; _currentTab pushBack _sort;
_return pushBack _sortName; _return pushBack _sortName;
} else { } else {
TRACE_1("A sort with this ID already exists", _sortName); TRACE_1("A sort with this ID already exists",_sortName);
}; };
} forEach _tabsToAddTo; } forEach _tabsToAddTo;
}; };

View File

@ -77,7 +77,7 @@ private _fnc_addToTabs = {
// Find if there is an entry with same ID // Find if there is an entry with same ID
if (_currentTab findIf {_x select 5 == _statName} != -1) then { if (_currentTab findIf {_x select 5 == _statName} != -1) then {
TRACE_1("A stat with this ID already exists", _statName); TRACE_1("A stat with this ID already exists",_statName);
} else { } else {
_stat = +_finalArray; _stat = +_finalArray;
_stat set [5, _statName]; _stat set [5, _statName];

View File

@ -17,7 +17,7 @@
params ["_display", "_control", "_nextPage"]; params ["_display", "_control", "_nextPage"];
TRACE_1("control enabled", ctrlEnabled _control); TRACE_1("control enabled",ctrlEnabled _control);
if !(ctrlEnabled _control) exitWith {}; if !(ctrlEnabled _control) exitWith {};
GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage); GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage);

View File

@ -17,7 +17,7 @@
params ["_display", "_control", "_nextPage"]; params ["_display", "_control", "_nextPage"];
TRACE_1("control enabled", ctrlEnabled _control); TRACE_1("control enabled",ctrlEnabled _control);
if !(ctrlEnabled _control) exitWith {}; if !(ctrlEnabled _control) exitWith {};
GVAR(currentStatPage) = GVAR(currentStatPage) + ([-1, 1] select _nextPage); GVAR(currentStatPage) = GVAR(currentStatPage) + ([-1, 1] select _nextPage);

View File

@ -101,7 +101,7 @@ private _priority = 0;
(_finalArray select 4) set [1, compile (getText (_x >> "textStatement"))]; (_finalArray select 4) set [1, compile (getText (_x >> "textStatement"))];
}; };
TRACE_3("stats array", _finalArray, _leftTabsList, _rightTabsList); TRACE_3("stats array",_finalArray,_leftTabsList,_rightTabsList);
if (_leftTabsList isNotEqualTo []) then { if (_leftTabsList isNotEqualTo []) then {
[_statsListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs; [_statsListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;

View File

@ -15,7 +15,7 @@
* Public: No * Public: No
*/ */
LOG_2("Trying to load gunlist from profile [Version: %1][Count: %2]", profileNamespace getVariable [ARR_2(QGVAR(profileNamespaceVersion), 'none')], count (profileNamespace getVariable [ARR_2(QGVAR(gunList), [])])); LOG_2("Trying to load gunlist from profile [Version: %1][Count: %2]",profileNamespace getVariable [ARR_2(QGVAR(profileNamespaceVersion),'none')],count (profileNamespace getVariable [ARR_2(QGVAR(gunList),[])]));
private _resetGunList = true; private _resetGunList = true;
if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && {count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0}) then { if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && {count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0}) then {

View File

@ -16,7 +16,7 @@
*/ */
params ["_vehicle"]; params ["_vehicle"];
TRACE_1("params", _vehicle); TRACE_1("params",_vehicle);
scopeName "main"; scopeName "main";

View File

@ -44,7 +44,7 @@ if (_item getVariable [QGVAR(initObject),false]) exitWith {};
if (_canLoadConfig) then { if (_canLoadConfig) then {
GVAR(initializedItemClasses) pushBack _type; GVAR(initializedItemClasses) pushBack _type;
TRACE_1("Adding load cargo action to class", _type); TRACE_1("Adding load cargo action to class",_type);
{ {
[_type, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToClass); [_type, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToClass);
@ -52,7 +52,7 @@ if (_canLoadConfig) then {
} else { } else {
_item setVariable [QGVAR(initObject), true]; _item setVariable [QGVAR(initObject), true];
TRACE_1("Adding load cargo action to object", _item); TRACE_1("Adding load cargo action to object",_item);
{ {
[_item, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToObject); [_item, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToObject);

View File

@ -16,7 +16,7 @@
*/ */
params ["_vehicle"]; params ["_vehicle"];
TRACE_1("params", _vehicle); TRACE_1("params",_vehicle);
private _type = typeOf _vehicle; private _type = typeOf _vehicle;
private _config = configOf _vehicle; private _config = configOf _vehicle;
@ -68,13 +68,13 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {};
if (_hasCargoConfig) then { if (_hasCargoConfig) then {
GVAR(initializedVehicleClasses) pushBack _type; GVAR(initializedVehicleClasses) pushBack _type;
TRACE_1("Adding unload cargo action to class", _type); TRACE_1("Adding unload cargo action to class",_type);
[_type, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToClass); [_type, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToClass);
} else { } else {
_vehicle setVariable [QGVAR(initVehicle), true]; _vehicle setVariable [QGVAR(initVehicle), true];
TRACE_1("Adding unload cargo action to object", _vehicle); TRACE_1("Adding unload cargo action to object",_vehicle);
[_vehicle, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToObject); [_vehicle, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToObject);
}; };

View File

@ -142,7 +142,7 @@ if (isServer) then {
if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then { if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then {
{ {
if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith { if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith {
INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`", [_x] call FUNC(getName), _dcPlayer, _x); INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x);
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true]; _x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
}; };
nil nil

View File

@ -5,7 +5,7 @@
if (isFilePatchingEnabled) then { if (isFilePatchingEnabled) then {
private _notLoaded = configProperties [configfile >> "ace_notLoaded", "isText _x"]; private _notLoaded = configProperties [configfile >> "ace_notLoaded", "isText _x"];
{ {
INFO_2("%1 not loaded because %2",configName _x, getText _x); INFO_2("%1 not loaded because %2",configName _x,getText _x);
} forEach _notLoaded; } forEach _notLoaded;
}; };

View File

@ -18,11 +18,11 @@ private _allUnits = [];
{ {
private _class = configFile >> "CfgVehicles" >> _x; private _class = configFile >> "CfgVehicles" >> _x;
if (isNull _class) then { if (isNull _class) then {
WARNING_1("in units[] but null - %1", _x); WARNING_1("in units[] but null - %1",_x);
_testPass = false; _testPass = false;
} else { } else {
// if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then { // if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then {
// WARNING_2("in units[] but not public - %1 from %2", configName _class, configSourceMod _class); // WARNING_2("in units[] but not public - %1 from %2",configName _class,configSourceMod _class);
// _testPass = false; // _testPass = false;
// }; // };
}; };
@ -36,11 +36,11 @@ private _allWeapons = [];
{ {
private _class = configFile >> "CfgWeapons" >> _x; private _class = configFile >> "CfgWeapons" >> _x;
if (isNull _class) then { if (isNull _class) then {
WARNING_1("in weapons[] but null - %1", _x); WARNING_1("in weapons[] but null - %1",_x);
_testPass = false; _testPass = false;
} else { } else {
// if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then { // if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then {
// WARNING_2("in weapons[] but not public - %1 from %2", configName _class, configSourceMod _class); // WARNING_2("in weapons[] but not public - %1 from %2",configName _class,configSourceMod _class);
// _testPass = false; // _testPass = false;
// }; // };
}; };
@ -51,7 +51,7 @@ private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFil
{ {
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then { if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
if (!((toLower configName _x) in _allUnits)) then { if (!((toLower configName _x) in _allUnits)) then {
WARNING_2("Not in any units[] - %1 from %2", configName _x, configSourceMod _x); WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x);
_testPass = false; _testPass = false;
}; };
}; };
@ -63,7 +63,7 @@ private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (config
private _type = toLower configName _x; private _type = toLower configName _x;
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then { if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
if (!((toLower configName _x) in _allWeapons)) then { if (!((toLower configName _x) in _allWeapons)) then {
WARNING_2("Not in any weapons[] - %1 from %2", configName _x, configSourceMod _x); WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x);
_testPass = false; _testPass = false;
}; };
}; };

View File

@ -27,7 +27,7 @@ if (isServer) then {
params ["_eventName", "_client"]; params ["_eventName", "_client"];
if !(_eventName in GVAR(syncedEvents)) exitWith { if !(_eventName in GVAR(syncedEvents)) exitWith {
ERROR_1("Request for synced event - key [%1] not found.", _eventName); ERROR_1("Request for synced event - key [%1] not found.",_eventName);
false false
}; };

View File

@ -20,7 +20,7 @@
params ["_name", "_args", "_ttl"]; params ["_name", "_args", "_ttl"];
if !(_name in GVAR(syncedEvents)) exitWith { if !(_name in GVAR(syncedEvents)) exitWith {
ERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name); ERROR_1("Synced event key [%1] not found (_handleSyncedEvent).",_name);
false false
}; };

View File

@ -22,7 +22,7 @@ private _output = [format ["// CBA Settings [ADDON: %1]:", _addon]];
private _addonSearch = _addon + "_"; private _addonSearch = _addon + "_";
private _addonSearchCount = count _addonSearch; private _addonSearchCount = count _addonSearch;
TRACE_2("",_addonSearch, _addonSearchCount); TRACE_2("",_addonSearch,_addonSearchCount);
private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x) && {((configName _x) select [0, _addonSearchCount]) == _addonSearch}"]; private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x) && {((configName _x) select [0, _addonSearchCount]) == _addonSearch}"];

View File

@ -34,7 +34,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then { if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
// CBA_settings_fnc_set will do type checking for the old profile var // CBA_settings_fnc_set will do type checking for the old profile var
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set; private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret); INFO_3("Transfering setting [%1: %2] returned %3",_settingName,_profileVar,_ret);
}; };
}; };
} forEach _aceSettings; } forEach _aceSettings;

View File

@ -80,7 +80,7 @@ if (_oldCompats isNotEqualTo []) then {
_oldCompats = _oldCompats apply {format ["%1 (%2)", _x select 0, _x select 1]}; _oldCompats = _oldCompats apply {format ["%1 (%2)", _x select 0, _x select 1]};
[{ [{
// Lasts for ~10 seconds // Lasts for ~10 seconds
ERROR_WITH_TITLE_3("The following ACE compatiblity PBOs are outdated", "%1. ACE Main version is %2 from %3.",_this select 0,_this select 1,_this select 2); ERROR_WITH_TITLE_3("The following ACE compatiblity PBOs are outdated","%1. ACE Main version is %2 from %3.",_this select 0,_this select 1,_this select 2);
}, [_oldCompats, _mainVersion, _mainSource], 1] call CBA_fnc_waitAndExecute; }, [_oldCompats, _mainVersion, _mainSource], 1] call CBA_fnc_waitAndExecute;
}; };

View File

@ -24,7 +24,7 @@
BEGIN_COUNTER(firedEH); BEGIN_COUNTER(firedEH);
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile); TRACE_7("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
if (_unit isKindOf "CAManBase") then { if (_unit isKindOf "CAManBase") then {
// The unit it on foot // The unit it on foot

View File

@ -27,7 +27,7 @@ if (getNumber (_unitAnimationCfg >> "terminal") == 1) exitWith {_animationState}
private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText (_unitAnimationCfg >> "actions"); private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText (_unitAnimationCfg >> "actions");
TRACE_2("Animation/Action", configName _unitAnimationCfg, configName _unitActionsCfg); TRACE_2("Animation/Action",configName _unitAnimationCfg,configName _unitActionsCfg);
if (vehicle _unit != _unit) then { if (vehicle _unit != _unit) then {
private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo"); private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo");

View File

@ -25,7 +25,7 @@ private _pov = getText (_turret >> "memoryPointGunnerOptics");
private _gunBeg = getText (_turret >> "gunBeg"); private _gunBeg = getText (_turret >> "gunBeg");
private _gunEnd = getText (_turret >> "gunEnd"); private _gunEnd = getText (_turret >> "gunEnd");
TRACE_3("", _pov, _gunBeg, _gunEnd); TRACE_3("",_pov,_gunBeg,_gunEnd);
// Pull the PIP pov or barrel direction, depending on how the model is set up // Pull the PIP pov or barrel direction, depending on how the model is set up
private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov); private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov);

View File

@ -22,7 +22,7 @@ params ["_soundClass", "_posASL", "_volume", "_distance"];
private _sound = getArray (configFile >> "CfgSounds" >> _soundClass >> "sound"); private _sound = getArray (configFile >> "CfgSounds" >> _soundClass >> "sound");
if (_sound isEqualTo []) exitWith { if (_sound isEqualTo []) exitWith {
ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array", _soundClass); ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array",_soundClass);
}; };
TRACE_2("sound",_soundClass,_sound); TRACE_2("sound",_soundClass,_sound);

View File

@ -23,7 +23,7 @@ params ["_logic", "_settingName", "_moduleVariable"];
// Check if the variable is already defined // Check if the variable is already defined
if (isNil _settingName) exitWith { if (isNil _settingName) exitWith {
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName); ERROR_1("readSettingFromModule - param [%1] is not an ace_setting",_settingName);
}; };
// Check if the parameter is defined in the module // Check if the parameter is defined in the module

View File

@ -32,7 +32,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
// Check if the variable is already defined // Check if the variable is already defined
if (isNil _settingName) exitWith { if (isNil _settingName) exitWith {
ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting",_settingName);
}; };
// The setting is not forced, so update the value // The setting is not forced, so update the value
@ -52,7 +52,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
}; };
if (!_validValue) exitWith { if (!_validValue) exitWith {
WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_settingType); WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]",_settingName,_settingValue,_settingType);
}; };
if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then { if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then {

View File

@ -18,7 +18,7 @@
params ["_name"]; params ["_name"];
if !(_name in GVAR(syncedEvents)) exitWith { if !(_name in GVAR(syncedEvents)) exitWith {
ERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name); ERROR_1("Synced event key [%1] not found (removeSyncedEventHandler)",_name);
false false
}; };

View File

@ -22,7 +22,7 @@ private _startTime = diag_tickTime;
private _fails = []; private _fails = [];
private _total = 0; private _total = 0;
INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest); INFO_1("ace_common_fnc_runTests starting for [%1]",_specificTest);
{ {
private _testName = configName _x; private _testName = configName _x;
@ -41,8 +41,8 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
}; };
} forEach (configProperties [configFile >> "ACE_Tests"]); } forEach (configProperties [configFile >> "ACE_Tests"]);
INFO_1("ace_common_fnc_runTests finished in %1 ms", (1000 * (diag_tickTime - _startTime)) toFixed 1); INFO_1("ace_common_fnc_runTests finished in %1 ms",(1000 * (diag_tickTime - _startTime)) toFixed 1);
INFO_2("[%1 / %2] Tests Passed", (_total - (count _fails)), _total); INFO_2("[%1 / %2] Tests Passed",(_total - (count _fails)),_total);
if (_fails isNotEqualTo []) then { if (_fails isNotEqualTo []) then {
INFO_1("Failed: %1", _fails); INFO_1("Failed: %1",_fails);
}; };

View File

@ -38,4 +38,4 @@ if (abs(_value - _oldValue) < _tolerance) exitWith {};
_object setVariable [_varName, _value, true]; _object setVariable [_varName, _value, true];
_object setVariable [_oldVarName, _value]; _object setVariable [_oldVarName, _value];
TRACE_2("Published variable:", _varName, _value); TRACE_2("Published variable:",_varName,_value);

View File

@ -34,7 +34,7 @@ if (_object isEqualTo (_object getVariable [format ["ACE_onEmbargo_%1", _varName
_object setVariable [_varName, _value, true]; _object setVariable [_varName, _value, true];
_object setVariable [format ["ACE_onEmbargo_%1", _varName], _object]; _object setVariable [format ["ACE_onEmbargo_%1", _varName], _object];
TRACE_2("Starting Embargo", _varName, _delay); TRACE_2("Starting Embargo",_varName,_delay);
[{ [{
params ["_object", "_varName", "_value"]; params ["_object", "_varName", "_value"];
@ -43,7 +43,7 @@ TRACE_2("Starting Embargo", _varName, _delay);
_object setVariable [format ["ACE_onEmbargo_%1", _varName], nil]; //Remove Embargo _object setVariable [format ["ACE_onEmbargo_%1", _varName], nil]; //Remove Embargo
private _curValue = _object getVariable _varName; private _curValue = _object getVariable _varName;
TRACE_4("End of embargo", _object, _varName, _value, _curValue); TRACE_4("End of embargo",_object,_varName,_value,_curValue);
//If value at start of embargo doesn't equal current, then broadcast and start new embargo //If value at start of embargo doesn't equal current, then broadcast and start new embargo
if (_value isNotEqualTo _curValue) then { if (_value isNotEqualTo _curValue) then {

View File

@ -41,11 +41,11 @@ if (isArray (missionConfigFile >> "showHUD")) then {
if (_reason != "") then { if (_reason != "") then {
_reason = toLower _reason; _reason = toLower _reason;
if (_mask isEqualTo []) then { if (_mask isEqualTo []) then {
TRACE_2("Removing", _reason, _mask); TRACE_2("Removing",_reason,_mask);
GVAR(showHudHash) deleteAt _reason; GVAR(showHudHash) deleteAt _reason;
} else { } else {
while {(count _mask) < 10} do { _mask pushBack true; }; while {(count _mask) < 10} do { _mask pushBack true; };
TRACE_2("Setting", _reason, _mask); TRACE_2("Setting",_reason,_mask);
GVAR(showHudHash) set [_reason, _mask]; GVAR(showHudHash) set [_reason, _mask];
}; };
}; };
@ -63,7 +63,7 @@ for "_index" from 0 to 9 do {
_resultMask pushBack _set; _resultMask pushBack _set;
}; };
TRACE_2("showHud", _resultMask, keys GVAR(showHudHash)); TRACE_2("showHud",_resultMask,keys GVAR(showHudHash));
showHud _resultMask; showHud _resultMask;
_resultMask _resultMask

View File

@ -21,8 +21,8 @@
params [["_name", "", [""]], ["_isGlobal", false, [false]], ["_commonReasonsArray", [], [[]]], ["_sendJIP", false, [false]]]; params [["_name", "", [""]], ["_isGlobal", false, [false]], ["_commonReasonsArray", [], [[]]], ["_sendJIP", false, [false]]];
TRACE_3("params",_name,_isGlobal,_commonReasonsArray); TRACE_3("params",_name,_isGlobal,_commonReasonsArray);
if (_name == "") exitWith {ERROR_1("addStatusEffect - Bad Name %1", _this)}; if (_name == "") exitWith {ERROR_1("addStatusEffect - Bad Name %1",_this)};
if (_name in GVAR(statusEffect_Names)) exitWith {WARNING_1("addStatusEffect - Effect Already Added (note, will not update global bit) %1", _this)}; if (_name in GVAR(statusEffect_Names)) exitWith {WARNING_1("addStatusEffect - Effect Already Added (note, will not update global bit) %1",_this)};
if (_sendJIP && !_isGlobal) exitWith {WARNING_1("addStatusEffect - Trying to add non-global JIP effect %1",_this)}; if (_sendJIP && !_isGlobal) exitWith {WARNING_1("addStatusEffect - Trying to add non-global JIP effect %1",_this)};
GVAR(statusEffect_Names) pushBack _name; GVAR(statusEffect_Names) pushBack _name;

View File

@ -22,12 +22,12 @@ TRACE_2("params",_object,_isLocal);
//Only run this after the settings are initialized //Only run this after the settings are initialized
//Need to wait for all EH to be installed (local event will happen between pre and post init) //Need to wait for all EH to be installed (local event will happen between pre and post init)
if !(GVAR(settingsInitFinished)) exitWith { if !(GVAR(settingsInitFinished)) exitWith {
TRACE_1("pushing to runAtSettingsInitialized", _this); TRACE_1("pushing to runAtSettingsInitialized",_this);
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_localEH), _this]; GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_localEH), _this];
}; };
if (!_isLocal) exitWith {TRACE_1("object no longer local", _this)}; if (!_isLocal) exitWith {TRACE_1("object no longer local",_this)};
if (isNull _object) exitWith {TRACE_1("object null", _this)}; if (isNull _object) exitWith {TRACE_1("object null",_this)};
//Reset any variables because of respawn //Reset any variables because of respawn
[_object, false] call FUNC(statusEffect_resetVariables); [_object, false] call FUNC(statusEffect_resetVariables);

View File

@ -21,12 +21,12 @@ TRACE_1("params",_object);
//Only run this after the settings are initialized //Only run this after the settings are initialized
//Need to wait for all EH to be installed (local event will happen between pre and post init) //Need to wait for all EH to be installed (local event will happen between pre and post init)
if !(GVAR(settingsInitFinished)) exitWith { if !(GVAR(settingsInitFinished)) exitWith {
TRACE_1("pushing to runAtSettingsInitialized", _this); TRACE_1("pushing to runAtSettingsInitialized",_this);
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_respawnEH), _this]; GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_respawnEH), _this];
}; };
if (!local _object) exitWith {TRACE_1("object no longer local", _this)}; if (!local _object) exitWith {TRACE_1("object no longer local",_this)};
if (isNull _object) exitWith {TRACE_1("object null", _this)}; if (isNull _object) exitWith {TRACE_1("object null",_this)};
//Reset any variables on "real" respawn //Reset any variables on "real" respawn
[_object, false] call FUNC(statusEffect_resetVariables); [_object, false] call FUNC(statusEffect_resetVariables);

View File

@ -32,17 +32,17 @@ if (isNull _object) exitWith {};
private _eventName = format [QGVAR(%1), _x]; private _eventName = format [QGVAR(%1), _x];
switch (true) do { switch (true) do {
case (GVAR(statusEffect_sendJIP) select _forEachIndex): { case (GVAR(statusEffect_sendJIP) select _forEachIndex): {
TRACE_2("Sending Global JIP Event", _object, _effectNumber); TRACE_2("Sending Global JIP Event",_object,_effectNumber);
private _jipID = format [QGVAR(effect_%1_%2), _eventName, hashValue _object]; private _jipID = format [QGVAR(effect_%1_%2), _eventName, hashValue _object];
[_eventName, [_object, _effectNumber], _jipID] call CBA_fnc_globalEventJIP; [_eventName, [_object, _effectNumber], _jipID] call CBA_fnc_globalEventJIP;
[_jipID, _object] call CBA_fnc_removeGlobalEventJIP; [_jipID, _object] call CBA_fnc_removeGlobalEventJIP;
}; };
case (GVAR(statusEffect_isGlobal) select _forEachIndex): { case (GVAR(statusEffect_isGlobal) select _forEachIndex): {
TRACE_2("Sending Global Event", _object, _effectNumber); TRACE_2("Sending Global Event",_object,_effectNumber);
[_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent; [_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
}; };
default { default {
TRACE_2("Sending Target Event", _object, _effectNumber); TRACE_2("Sending Target Event",_object,_effectNumber);
[_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent; [_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
}; };
}; };

View File

@ -23,7 +23,7 @@ TRACE_4("params",_object,_effectName,_ID,_set);
//Only run this after the settings are initialized //Only run this after the settings are initialized
if !(GVAR(settingsInitFinished)) exitWith { if !(GVAR(settingsInitFinished)) exitWith {
TRACE_1("pushing to runAtSettingsInitialized", _this); TRACE_1("pushing to runAtSettingsInitialized",_this);
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_set), _this]; GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_set), _this];
}; };

View File

@ -20,7 +20,7 @@
params ["_name", "_args", ["_ttl", 0]]; params ["_name", "_args", ["_ttl", 0]];
if !(_name in GVAR(syncedEvents)) exitWith { if !(_name in GVAR(syncedEvents)) exitWith {
ERROR_1("Synced event key [%1] not found (syncedEvent).", _name); ERROR_1("Synced event key [%1] not found (syncedEvent)",_name);
false false
}; };

View File

@ -35,7 +35,7 @@ if (_emptyPos isEqualTo []) then {
}; };
if (count _emptyPos != 3) exitwith { if (count _emptyPos != 3) exitwith {
WARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle, getPosASL _vehicle, isTouchingGround _vehicle, speed _vehicle); WARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then { if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
//display text saying there are no safe places to exit the vehicle //display text saying there are no safe places to exit the vehicle
[QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent; [QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;

View File

@ -33,7 +33,7 @@ private _magazine = _magazines select _magazineIndex;
_magazine params ["_magazineClassname", "_amountOfMagazines"]; _magazine params ["_magazineClassname", "_amountOfMagazines"];
if (_amountOfMagazines < 0) exitWith { if (_amountOfMagazines < 0) exitWith {
ERROR_1("mag with no ammo - %1", _magazine); ERROR_1("mag with no ammo - %1",_magazine);
}; };
private _removed = _amountOfMagazines min floor(1 + random(6 / GVAR(ammoCookoffDuration))); private _removed = _amountOfMagazines min floor(1 + random(6 / GVAR(ammoCookoffDuration)));

View File

@ -7,7 +7,7 @@ INFO("Checking static weapons");
private _staticWeaponConfigs = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {(configName _x) isKindOf 'StaticWeapon'}", true]; private _staticWeaponConfigs = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {(configName _x) isKindOf 'StaticWeapon'}", true];
private _staticPublic = _staticWeaponConfigs select {(getNumber (_x >> "scope")) == 2}; private _staticPublic = _staticWeaponConfigs select {(getNumber (_x >> "scope")) == 2};
INFO_2("Static Weapons [%1] - CSW Enabled [%2]",count _staticPublic, {(getNumber (_x >> "ace_csw" >> "enabled")) == 1} count _staticPublic); INFO_2("Static Weapons [%1] - CSW Enabled [%2]",count _staticPublic,{(getNumber (_x >> "ace_csw" >> "enabled")) == 1} count _staticPublic);
INFO("------ Checking static weapons inheritance ------"); INFO("------ Checking static weapons inheritance ------");
private _explicitBases = []; private _explicitBases = [];

View File

@ -24,7 +24,7 @@
params ["_vehicle", "_turret", "_magSource", "_carryMag", "_ammoReceived", ["_returnTo", _magSource]]; params ["_vehicle", "_turret", "_magSource", "_carryMag", "_ammoReceived", ["_returnTo", _magSource]];
TRACE_6("reload_handleAddTurretMag",_vehicle,_turret,_magSource,_carryMag,_ammoReceived,_returnTo); TRACE_6("reload_handleAddTurretMag",_vehicle,_turret,_magSource,_carryMag,_ammoReceived,_returnTo);
TRACE_2("",local _vehicle, _vehicle turretLocal _turret); TRACE_2("",local _vehicle,_vehicle turretLocal _turret);
if (!(_vehicle turretLocal _turret)) exitWith {}; if (!(_vehicle turretLocal _turret)) exitWith {};
([_vehicle, _turret, _carryMag] call FUNC(reload_canLoadMagazine)) params ["_canAdd", "_loadedMag", "_neededAmmo", "_isBeltLinking"]; ([_vehicle, _turret, _carryMag] call FUNC(reload_canLoadMagazine)) params ["_canAdd", "_loadedMag", "_neededAmmo", "_isBeltLinking"];
@ -43,10 +43,10 @@ if (_canAdd) then {
// setMagazineTurretAmmo is broken on split locality, use setAmmo for now (this may not work for multi turret vehicles) // setMagazineTurretAmmo is broken on split locality, use setAmmo for now (this may not work for multi turret vehicles)
private _weapon = (_vehicle weaponsTurret _turret) param [0, ""]; private _weapon = (_vehicle weaponsTurret _turret) param [0, ""];
TRACE_3("setAmmo",_vehicle,_weapon, _currentAmmo); TRACE_3("setAmmo",_vehicle,_weapon,_currentAmmo);
_vehicle setAmmo [_weapon, _currentAmmo]; _vehicle setAmmo [_weapon, _currentAmmo];
private _currentAmmo = _vehicle magazineTurretAmmo [_loadedMag, _turret]; private _currentAmmo = _vehicle magazineTurretAmmo [_loadedMag, _turret];
if ((_weapon == "") || {_currentAmmo != _currentAmmo}) then { ERROR_1("failed to setAmmo - %1", _this); }; if ((_weapon == "") || {_currentAmmo != _currentAmmo}) then { ERROR_1("failed to setAmmo - %1",_this); };
} else { } else {
if (_loadedMag != "") then { if (_loadedMag != "") then {
TRACE_1("Removing emtpy mag",_loadedMag); TRACE_1("Removing emtpy mag",_loadedMag);

View File

@ -23,7 +23,7 @@
params ["_vehicle", "_turretPath", "_carryMag", "_vehMag", "_unloadTo"]; params ["_vehicle", "_turretPath", "_carryMag", "_vehMag", "_unloadTo"];
TRACE_5("removeTurretMag EH",_vehicle,_turretPath,_carryMag,_vehMag,_unloadTo); TRACE_5("removeTurretMag EH",_vehicle,_turretPath,_carryMag,_vehMag,_unloadTo);
TRACE_3("",local _vehicle, _vehicle turretLocal _turretPath,local _unloadTo); TRACE_3("",local _vehicle,_vehicle turretLocal _turretPath,local _unloadTo);
if (!(_vehicle turretLocal _turretPath)) exitWith {}; if (!(_vehicle turretLocal _turretPath)) exitWith {};
private _magsInWeapon = []; // Check how much ammo it has now: private _magsInWeapon = []; // Check how much ammo it has now:
@ -55,10 +55,10 @@ if ((_magsInWeapon isEqualTo []) && {_ammoInFirstMag > _ammoRemoved}) then {
// setMagazineTurretAmmo is broken on split locality, use setAmmo for now // setMagazineTurretAmmo is broken on split locality, use setAmmo for now
private _weapon = (_vehicle weaponsTurret _turretPath) param [0, ""]; private _weapon = (_vehicle weaponsTurret _turretPath) param [0, ""];
TRACE_3("setAmmo",_vehicle,_weapon, _ammoLeft); TRACE_3("setAmmo",_vehicle,_weapon,_ammoLeft);
_vehicle setAmmo [_weapon, _ammoLeft]; _vehicle setAmmo [_weapon, _ammoLeft];
private _currentAmmo = _vehicle magazineTurretAmmo [_vehMag, _turretPath]; private _currentAmmo = _vehicle magazineTurretAmmo [_vehMag, _turretPath];
if ((_weapon == "") || {_currentAmmo != _ammoLeft}) then { ERROR_1("failed to setAmmo - %1", _this); }; if ((_weapon == "") || {_currentAmmo != _ammoLeft}) then { ERROR_1("failed to setAmmo - %1",_this); };
} else { } else {

View File

@ -51,7 +51,7 @@ private _onFinish = {
[_magSource, _carryMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine); [_magSource, _carryMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine);
if (_bestAmmoToSend == 0) exitWith {}; if (_bestAmmoToSend == 0) exitWith {};
TRACE_6("calling addTurretMag event",_vehicle,_turret,_magSource,_carryMag,_bestAmmoToSend, _unit); TRACE_6("calling addTurretMag event",_vehicle,_turret,_magSource,_carryMag,_bestAmmoToSend,_unit);
[QGVAR(addTurretMag), [_vehicle, _turret, _magSource, _carryMag, _bestAmmoToSend, _unit]] call CBA_fnc_globalEvent; [QGVAR(addTurretMag), [_vehicle, _turret, _magSource, _carryMag, _bestAmmoToSend, _unit]] call CBA_fnc_globalEvent;
}; };

View File

@ -50,7 +50,7 @@ if (isServer) then {
["ace_unconscious", { ["ace_unconscious", {
params ["_unit", "_isUnconscious"]; params ["_unit", "_isUnconscious"];
if (!_isUnconscious) exitWith {}; if (!_isUnconscious) exitWith {};
TRACE_1("Knocked Out, Doing Deadman", _unit); TRACE_1("Knocked Out, Doing Deadman",_unit);
[_unit] call FUNC(onIncapacitated); [_unit] call FUNC(onIncapacitated);
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
}; };

View File

@ -161,7 +161,7 @@ GVAR(TweakedAngle) = 0;
private _placeAngle = 0; private _placeAngle = 0;
private _expSetupVehicle = _setupObjectClass createVehicle (_virtualPosASL call EFUNC(common,ASLToPosition)); private _expSetupVehicle = _setupObjectClass createVehicle (_virtualPosASL call EFUNC(common,ASLToPosition));
TRACE_1("Planting Mass", (getMass _expSetupVehicle)); TRACE_1("Planting Mass",(getMass _expSetupVehicle));
//If the object is too heavy, it can kill a player if it colides //If the object is too heavy, it can kill a player if it colides
if ((getMass _expSetupVehicle) > 5) then {_expSetupVehicle setMass 5;}; if ((getMass _expSetupVehicle) > 5) then {_expSetupVehicle setMass 5;};

View File

@ -16,7 +16,7 @@
*/ */
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []]; private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []];
@ -50,7 +50,7 @@ if (_zeroDistance > 0) then {
private _antiOffset = _gunner getVariable QGVAR(lastAntiOffset); private _antiOffset = _gunner getVariable QGVAR(lastAntiOffset);
_offset = _offset - _antiOffset; _offset = _offset - _antiOffset;
TRACE_4("fired",_gunner, currentZeroing _gunner, _antiOffset, _offset); TRACE_4("fired",_gunner,currentZeroing _gunner,_antiOffset,_offset);
}; };
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection); [_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection);

View File

@ -4,7 +4,7 @@ if (!hasInterface) exitWith {};
["CBA_settingsInitialized", { ["CBA_settingsInitialized", {
//If not enabled, dont't bother adding eventhandler //If not enabled, dont't bother adding eventhandler
TRACE_1("CBA_settingsInitialized eh", GVAR(enabled)); TRACE_1("CBA_settingsInitialized eh",GVAR(enabled));
if (!GVAR(enabled)) exitWith {}; if (!GVAR(enabled)) exitWith {};
GVAR(lastFPTime) = -1; GVAR(lastFPTime) = -1;

View File

@ -25,12 +25,12 @@ private _fingerPos = if (_sourceUnit == ACE_player) then {
_fingerPosPrecise vectorAdd ([random (2 * FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2 * FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2 * FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y] vectorMultiply _distance) _fingerPosPrecise vectorAdd ([random (2 * FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2 * FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2 * FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y] vectorMultiply _distance)
}; };
TRACE_3("incoming finger:", _sourceUnit, _fingerPosPrecise, _fingerPos); TRACE_3("incoming finger:",_sourceUnit,_fingerPosPrecise,_fingerPos);
private _data = [diag_tickTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName)), _sourceUnit]; private _data = [diag_tickTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName)), _sourceUnit];
GVAR(fingersHash) set [hashValue _sourceUnit, _data]; GVAR(fingersHash) set [hashValue _sourceUnit, _data];
if (GVAR(pfeh_id) == -1) then { if (GVAR(pfeh_id) == -1) then {
GVAR(pfeh_id) = [DFUNC(perFrameEH), 0, []] call CBA_fnc_addPerFrameHandler; GVAR(pfeh_id) = [DFUNC(perFrameEH), 0, []] call CBA_fnc_addPerFrameHandler;
TRACE_1("Started PFEH", GVAR(pfeh_id)); TRACE_1("Started PFEH",GVAR(pfeh_id));
}; };

View File

@ -44,7 +44,7 @@ private _iconBaseSize = GVAR(sizeCoef) * BASE_SIZE * 0.10713 * (call EFUNC(commo
} forEach GVAR(fingersHash); } forEach GVAR(fingersHash);
if (GVAR(fingersHash) isEqualTo createHashMap) then { if (GVAR(fingersHash) isEqualTo createHashMap) then {
TRACE_1("Ending PFEH", GVAR(pfeh_id)); TRACE_1("Ending PFEH",GVAR(pfeh_id));
[GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler; [GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler;
GVAR(pfeh_id) = -1; GVAR(pfeh_id) = -1;
}; };

View File

@ -10,7 +10,7 @@
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
["ace_settingsInitialized", { ["ace_settingsInitialized", {
TRACE_1("settingsInit", GVAR(enabled)); TRACE_1("settingsInit",GVAR(enabled));
if (!GVAR(enabled)) exitWith {}; if (!GVAR(enabled)) exitWith {};
if (isServer) then { if (isServer) then {

View File

@ -189,7 +189,7 @@ if (_isBurning) exitWith {};
if ((_unit isEqualTo vehicle _unit) && (_sdr || ({ 0.05 > random 1 }))) then { if ((_unit isEqualTo vehicle _unit) && (_sdr || ({ 0.05 > random 1 }))) then {
_unit setVariable [QGVAR(stopDropRoll), true]; _unit setVariable [QGVAR(stopDropRoll), true];
if !(_sdr) then { if !(_sdr) then {
TRACE_1("stop, drop, roll!", _unit); TRACE_1("stop,drop,roll!",_unit);
_unit setUnitPos "DOWN"; _unit setUnitPos "DOWN";
doStop _unit; doStop _unit;
}; };
@ -203,7 +203,7 @@ if (_isBurning) exitWith {};
private _vehicle = vehicle _unit; private _vehicle = vehicle _unit;
if (_vehicle != _unit) then { if (_vehicle != _unit) then {
TRACE_1("Ejecting", _unit); TRACE_1("Ejecting",_unit);
_unit leaveVehicle _vehicle; _unit leaveVehicle _vehicle;
unassignVehicle _unit; unassignVehicle _unit;
_unit action ["eject",_vehicle]; _unit action ["eject",_vehicle];

View File

@ -67,7 +67,7 @@ if (alive _round) then {
getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force)), getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force)),
getNumber (configFile >> "CfgAmmo" >> _type >> "indirecthit") * (sqrt (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"))) getNumber (configFile >> "CfgAmmo" >> _type >> "indirecthit") * (sqrt (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))
]; ];
TRACE_1("Initializing track", _round); TRACE_1("Initializing track",_round);
GVAR(objects) pushBack _round; GVAR(objects) pushBack _round;
GVAR(arguments) pushBack _args; GVAR(arguments) pushBack _args;

View File

@ -17,7 +17,7 @@
*/ */
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
private _shouldAdd = GVAR(cacheRoundsTypesToTrack) getVariable _ammo; private _shouldAdd = GVAR(cacheRoundsTypesToTrack) getVariable _ammo;
if (isNil "_shouldAdd") then { if (isNil "_shouldAdd") then {

View File

@ -144,7 +144,7 @@ if (_objects isNotEqualTo []) then {
private _vel = _vec vectorMultiply _fp; private _vel = _vec vectorMultiply _fp;
private _fragObj = (selectRandom _fragTypes) createVehicleLocal [0,0,10000]; private _fragObj = (selectRandom _fragTypes) createVehicleLocal [0,0,10000];
// TRACE_4("targeted",_fp, typeOf _fragObj,_lastPos vectorDistance _targetPos,typeOf _x); // TRACE_4("targeted",_fp,typeOf _fragObj,_lastPos vectorDistance _targetPos,typeOf _x);
_fragObj setPosASL _lastPos; _fragObj setPosASL _lastPos;
_fragObj setVectorDir _vec; _fragObj setVectorDir _vec;
_fragObj setVelocity _vel; _fragObj setVelocity _vel;

View File

@ -45,7 +45,7 @@ while {_objectCount > 0 && {_iter < (GVAR(maxTrackPerFrame) min _objectCount)}}
// Clean up dead object references // Clean up dead object references
private _deletionCount = 0; private _deletionCount = 0;
{ {
TRACE_1("GC Projectile", _x); TRACE_1("GC Projectile",_x);
private _deleteIndex = _x - _deletionCount; private _deleteIndex = _x - _deletionCount;
GVAR(objects) deleteAt _deleteIndex; GVAR(objects) deleteAt _deleteIndex;
GVAR(arguments) deleteAt _deleteIndex; GVAR(arguments) deleteAt _deleteIndex;

View File

@ -16,7 +16,7 @@
*/ */
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
// no dust in rain // no dust in rain
if (rain > 0.1) exitWith {true}; if (rain > 0.1) exitWith {true};

View File

@ -16,7 +16,7 @@
*/ */
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
if (_weapon != "Throw") exitWith {}; if (_weapon != "Throw") exitWith {};

View File

@ -132,7 +132,7 @@ private _numTransferredHC3 = 0;
}; };
}; };
default { default {
TRACE_1("No Valid HC to transfer to", _currentHC); TRACE_1("No Valid HC to transfer to",_currentHC);
}; };
}; };
}; };
@ -140,7 +140,7 @@ private _numTransferredHC3 = 0;
if (XGVAR(log)) then { if (XGVAR(log)) then {
private _numTransferredTotal = _numTransferredHC1 + _numTransferredHC2 + _numTransferredHC3; private _numTransferredTotal = _numTransferredHC1 + _numTransferredHC2 + _numTransferredHC3;
INFO_4("Groups Transferred: Total: %1 - HC1: %2 - HC2: %3 - HC3: %4", _numTransferredTotal, _numTransferredHC1, _numTransferredHC2, _numTransferredHC3); INFO_4("Groups Transferred: Total: %1 - HC1: %2 - HC2: %3 - HC3: %4",_numTransferredTotal,_numTransferredHC1,_numTransferredHC2,_numTransferredHC3);
}; };
// Allow rebalance flag // Allow rebalance flag

View File

@ -93,5 +93,5 @@ if (_attackStage >= 3 && { _seekerType isEqualTo "ARH" }) then {
}; };
}; };
// TRACE_1("Adjusted target position", _returnTargetPos); // TRACE_1("Adjusted target position",_returnTargetPos);
_returnTargetPos; _returnTargetPos;

View File

@ -19,7 +19,7 @@
if (!hasInterface) exitWith { [] }; if (!hasInterface) exitWith { [] };
if (!params [["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith {ERROR("Bad Params"); []}; if (!params [["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith {ERROR("Bad Params"); []};
if ((_parentPath param [0, ""]) != "ACE_ZeusActions") exitWith {ERROR_1("Bad path %1 - should have ACE_ZeusActions as base", _parentPath); []}; if ((_parentPath param [0, ""]) != "ACE_ZeusActions") exitWith {ERROR_1("Bad path %1 - should have ACE_ZeusActions as base",_parentPath); []};
TRACE_2("addActionToZeus",_parentPath,_action); TRACE_2("addActionToZeus",_parentPath,_action);
private _currentPath = GVAR(ZeusActions); private _currentPath = GVAR(ZeusActions);
@ -37,7 +37,7 @@ private _pathValid = false;
} forEach _currentPath; } forEach _currentPath;
} forEach _parentPath; } forEach _parentPath;
if (!_pathValid) exitWith {ERROR_1("Bad path %1", _parentPath); []}; if (!_pathValid) exitWith {ERROR_1("Bad path %1",_parentPath); []};
TRACE_1("Adding Action",_currentPath); TRACE_1("Adding Action",_currentPath);
_currentPath pushBack [_action, []]; _currentPath pushBack [_action, []];

View File

@ -27,7 +27,7 @@ if (isNil "_actionTrees") then {
private _parentNode = [_actionTrees, ["ACE_MainActions"]] call FUNC(findActionNode); private _parentNode = [_actionTrees, ["ACE_MainActions"]] call FUNC(findActionNode);
if (isNil {_parentNode}) then { if (isNil {_parentNode}) then {
TRACE_2("No Main Action on object", _objectType, _typeNum); TRACE_2("No Main Action on object",_objectType,_typeNum);
private _mainAction = ["ACE_MainActions", localize ELSTRING(interaction,MainAction), "", {}, {true}] call FUNC(createAction); private _mainAction = ["ACE_MainActions", localize ELSTRING(interaction,MainAction), "", {}, {true}] call FUNC(createAction);
[_objectType, _typeNum, [], _mainAction] call EFUNC(interact_menu,addActionToClass); [_objectType, _typeNum, [], _mainAction] call EFUNC(interact_menu,addActionToClass);
}; };

View File

@ -45,7 +45,7 @@ private _recurseFnc = {
private _displayName = getText (_entryCfg >> "displayName"); private _displayName = getText (_entryCfg >> "displayName");
private _distance = _parentDistance; private _distance = _parentDistance;
if (isNumber (_entryCfg >> "distance")) then {_distance = getNumber (_entryCfg >> "distance");}; if (isNumber (_entryCfg >> "distance")) then {_distance = getNumber (_entryCfg >> "distance");};
// if (_distance < _parentDistance) then {WARNING_3("[%1] distance %2 less than parent %3", configName _entryCfg, _distance, _parentDistance);}; // if (_distance < _parentDistance) then {WARNING_3("[%1] distance %2 less than parent %3",configName _entryCfg,_distance,_parentDistance);};
private _icon = if (isArray (_entryCfg >> "icon")) then { private _icon = if (isArray (_entryCfg >> "icon")) then {
getArray (_entryCfg >> "icon"); getArray (_entryCfg >> "icon");
} else { } else {
@ -74,7 +74,7 @@ private _recurseFnc = {
if (_condition isEqualTo "") then {_condition = "true"}; if (_condition isEqualTo "") then {_condition = "true"};
} else { } else {
// Add canInteract (including exceptions) and canInteractWith to condition // Add canInteract (including exceptions) and canInteractWith to condition
private _canInteractCondition = format [QUOTE([ARR_3(ACE_player,_target,%1)] call EFUNC(common,canInteractWith)), getArray (_entryCfg >> "exceptions")]; private _canInteractCondition = format [QUOTE([ARR_3(ACE_player,_target,%1)] call EFUNC(common,canInteractWith)),getArray (_entryCfg >> "exceptions")];
private _conditionFormatPattern = ["%1 && {%2}", "%2"] select (_condition isEqualTo "" || {_condition == "true"}); private _conditionFormatPattern = ["%1 && {%2}", "%2"] select (_condition isEqualTo "" || {_condition == "true"});
_condition = format [_conditionFormatPattern, _condition, _canInteractCondition]; _condition = format [_conditionFormatPattern, _condition, _canInteractCondition];
}; };

View File

@ -35,7 +35,7 @@ if (isNil {_parentNode}) exitWith {};
private _found = false; private _found = false;
{ {
if (((_x select 0) select 0) == _actionName) exitWith { if (((_x select 0) select 0) == _actionName) exitWith {
TRACE_2("Deleting Action", _forEachIndex, _x); TRACE_2("Deleting Action",_forEachIndex,_x);
_found = true; _found = true;
(_parentNode select 1) deleteAt _forEachIndex; (_parentNode select 1) deleteAt _forEachIndex;
}; };

View File

@ -18,7 +18,7 @@
*/ */
if (isNil QGVAR(arguments)) then { if (isNil QGVAR(arguments)) then {
TRACE_1("Starting optic draw", _this); TRACE_1("Starting optic draw",_this);
// reset shooter var: // reset shooter var:
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};

View File

@ -146,13 +146,13 @@ if (isNull _newTarget) then {
_fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire);
} else { } else {
if ((!isNull _newTarget) && {_currentTarget != _newTarget}) then { if ((!isNull _newTarget) && {_currentTarget != _newTarget}) then {
TRACE_1("New Target, reseting locking", _newTarget); TRACE_1("New Target, reseting locking",_newTarget);
_lockStartTime = CBA_missionTime; _lockStartTime = CBA_missionTime;
_currentTarget = _newTarget; _currentTarget = _newTarget;
}; };
if ((CBA_missionTime - _lockStartTime) > __LOCKONTIME) then { // Lock on after 3 seconds if ((CBA_missionTime - _lockStartTime) > __LOCKONTIME) then { // Lock on after 3 seconds
TRACE_2("LOCKED!", _currentTarget, _lockStartTime); TRACE_2("LOCKED!",_currentTarget,_lockStartTime);
__JavelinIGUISeek ctrlSetTextColor __ColorGreen; __JavelinIGUISeek ctrlSetTextColor __ColorGreen;
__JavelinIGUITargetingLines ctrlShow true; __JavelinIGUITargetingLines ctrlShow true;

View File

@ -24,13 +24,13 @@ TRACE_1("params",_this);
private _owners = allUnits select {(lasertarget _x) == _targetObject}; private _owners = allUnits select {(lasertarget _x) == _targetObject};
if (count _owners == 1) exitWith { if (count _owners == 1) exitWith {
TRACE_2("Laser target owner [allUnits]", _targetObject, _owners select 0); TRACE_2("Laser target owner [allUnits]",_targetObject,_owners select 0);
[_targetObject, _owners select 0] call FUNC(addLaserTarget); [_targetObject, _owners select 0] call FUNC(addLaserTarget);
}; };
_owners = vehicles select {(lasertarget _x) == _targetObject}; _owners = vehicles select {(lasertarget _x) == _targetObject};
if (count _owners == 1) exitWith { if (count _owners == 1) exitWith {
TRACE_2("Laser target owner [vehicles]", _targetObject, _owners select 0); TRACE_2("Laser target owner [vehicles]",_targetObject,_owners select 0);
[_targetObject, _owners select 0] call FUNC(addLaserTarget); [_targetObject, _owners select 0] call FUNC(addLaserTarget);
}; };
@ -58,7 +58,7 @@ TRACE_1("params",_this);
}; };
}; };
if (!_foundSource) then { if (!_foundSource) then {
WARNING_1("Laser target doesn't have owner", _targetObject); WARNING_1("Laser target doesn't have owner",_targetObject);
}; };
}, _this] call CBA_fnc_execNextFrame; }, _this] call CBA_fnc_execNextFrame;

View File

@ -26,7 +26,7 @@ GVAR(trackedLaserTargets) = GVAR(trackedLaserTargets) select {
// Turn off the laser in ace_laser // Turn off the laser in ace_laser
[_laserUuid] call FUNC(laserOff); [_laserUuid] call FUNC(laserOff);
TRACE_1("Laser off:", _laserUuid); TRACE_1("Laser off:",_laserUuid);
false false
} else { } else {
private _newCode = _owner getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; private _newCode = _owner getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];

View File

@ -101,7 +101,7 @@ private _finalOwner = objNull;
}; };
} forEach (values GVAR(laserEmitters)); // Go through all values in hash } forEach (values GVAR(laserEmitters)); // Go through all values in hash
TRACE_2("",count _spots, _spots); TRACE_2("",count _spots,_spots);
if ((count _spots) > 0) then { if ((count _spots) > 0) then {
private _bucketList = nil; private _bucketList = nil;

View File

@ -21,7 +21,7 @@
BEGIN_COUNTER(shootRay); BEGIN_COUNTER(shootRay);
params ["_posASL", "_dir", ["_ignoreVehicle1", objNull], ["_ignoreVehicle2", objNull]]; params ["_posASL", "_dir", ["_ignoreVehicle1", objNull], ["_ignoreVehicle2", objNull]];
// TRACE_2("ray origin:", _posASL, _dir); // TRACE_2("ray origin:",_posASL,_dir);
private _distance = 0; private _distance = 0;
private _resultPos = nil; private _resultPos = nil;
@ -43,7 +43,7 @@ if (_intersects isNotEqualTo []) then {
_resultPos = _posASL vectorAdd (_dir vectorMultiply _distance); _resultPos = _posASL vectorAdd (_dir vectorMultiply _distance);
}; };
TRACE_3("", _resultPos, _distance, _intersects); TRACE_3("",_resultPos,_distance,_intersects);
#ifdef DRAW_LASER_INFO #ifdef DRAW_LASER_INFO
if (!isNil "_resultPos") then { if (!isNil "_resultPos") then {

View File

@ -19,9 +19,9 @@ GVAR(flashlights) = [] call CBA_fnc_createNamespace;
setCurrentChannel GVAR(DefaultChannel); setCurrentChannel GVAR(DefaultChannel);
if (currentChannel == GVAR(DefaultChannel)) then { if (currentChannel == GVAR(DefaultChannel)) then {
// INFO_1("Channel Set - %1", currentChannel); // INFO_1("Channel Set - %1",currentChannel);
} else { } else {
ERROR_2("Failed To Set Channel %1 (is %2)", GVAR(DefaultChannel), currentChannel); ERROR_2("Failed To Set Channel %1 (is %2)",GVAR(DefaultChannel),currentChannel);
}; };
}, 0, []] call CBA_fnc_addPerFrameHandler; }, 0, []] call CBA_fnc_addPerFrameHandler;
}; };

View File

@ -22,4 +22,4 @@ params ["_logic"];
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_ShowPlayerNames), "ShowPlayerNames"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_ShowPlayerNames), "ShowPlayerNames"] call EFUNC(common,readSettingFromModule);
INFO_3("Blue Force Tracking Module Initialized:", GVAR(BFT_Enabled), GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); INFO_3("Blue Force Tracking Module Initialized:",GVAR(BFT_Enabled),GVAR(BFT_Interval),GVAR(BFT_HideAiGroups));

View File

@ -18,13 +18,13 @@
*/ */
params [["_player", objNull, [objNull]], ["_item", QGVAR(white), [""]]]; params [["_player", objNull, [objNull]], ["_item", QGVAR(white), [""]]];
TRACE_2("Placing flag", _player, _item); TRACE_2("Placing flag",_player,_item);
(GVAR(flagCache) get _item) params ["_vehicleClass"]; (GVAR(flagCache) get _item) params ["_vehicleClass"];
private _flag = _vehicleClass createVehicle [0, 0, 0]; private _flag = _vehicleClass createVehicle [0, 0, 0];
TRACE_1("Created flag", _flag); TRACE_1("Created flag",_flag);
// Set flag start height // Set flag start height
GVAR(objectHeight) = MAX_HEIGHT; GVAR(objectHeight) = MAX_HEIGHT;

View File

@ -32,7 +32,7 @@ GVAR(userPlacedMarkers) = [];
if (_index < 0) exitWith { if (_index < 0) exitWith {
if (!isMultiplayer) exitWith {}; if (!isMultiplayer) exitWith {};
WARNING_1("Could not find data for %1", _marker); WARNING_1("Could not find data for %1",_marker);
}; };
private _data = GVAR(allMapMarkersProperties) select _index; private _data = GVAR(allMapMarkersProperties) select _index;

View File

@ -37,12 +37,12 @@ TRACE_7("addDamageToUnit",_unit,_damageToAdd,_bodyPart,_typeOfDamage,_instigator
_bodyPart = toLower _bodyPart; _bodyPart = toLower _bodyPart;
private _bodyPartIndex = ALL_BODY_PARTS find _bodyPart; private _bodyPartIndex = ALL_BODY_PARTS find _bodyPart;
if (_bodyPartIndex < 0) then { _bodyPartIndex = ALL_SELECTIONS find _bodyPart; }; // 2nd attempt with selection names ("hand_l", "hand_r", "leg_l", "leg_r") if (_bodyPartIndex < 0) then { _bodyPartIndex = ALL_SELECTIONS find _bodyPart; }; // 2nd attempt with selection names ("hand_l", "hand_r", "leg_l", "leg_r")
if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1", _this); false}; if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1",_this); false};
if (isNull _unit || {!local _unit} || {!alive _unit}) exitWith {ERROR_2("addDamageToUnit - badUnit %1 [local %2]", _this, local _unit); false}; if (isNull _unit || {!local _unit} || {!alive _unit}) exitWith {ERROR_2("addDamageToUnit - badUnit %1 [local %2]",_this,local _unit); false};
if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1", _this); false}; if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1",_this); false};
if (!_overrideInvuln && {!((isDamageAllowed _unit) && {_unit getVariable [QEGVAR(medical,allowDamage), true]})}) exitWith { if (!_overrideInvuln && {!((isDamageAllowed _unit) && {_unit getVariable [QEGVAR(medical,allowDamage), true]})}) exitWith {
ERROR_1("addDamageToUnit - unit invulnerable %1", _this); false ERROR_1("addDamageToUnit - unit invulnerable %1",_this); false
}; };
// Extension is case sensitive and expects this format (different from ALL_BODY_PARTS) // Extension is case sensitive and expects this format (different from ALL_BODY_PARTS)
@ -69,7 +69,7 @@ private _selectionSpecific = true;
if (isClass _config) then { if (isClass _config) then {
_selectionSpecific = (getNumber (_config >> "selectionSpecific")) == 1; _selectionSpecific = (getNumber (_config >> "selectionSpecific")) == 1;
} else { } else {
WARNING_2("Damage type not in config [%1:%2]", _typeOfDamage, _config); WARNING_2("Damage type not in config [%1:%2]",_typeOfDamage,_config);
}; };
INFO_4("Debug AddDamageToUnit: Type [%1] - Selection Specific [%2] - HitPoint [%3 -> %4]",_typeOfDamage,_selectionSpecific,_startDmg select _bodyPartIndex,_endDmg select _bodyPartIndex); INFO_4("Debug AddDamageToUnit: Type [%1] - Selection Specific [%2] - HitPoint [%3 -> %4]",_typeOfDamage,_selectionSpecific,_startDmg select _bodyPartIndex,_endDmg select _bodyPartIndex);
INFO_4("Pain Change [%1 -> %2] - BodyPartDamage Change [%3 -> %4]",_startPain,_endPain,_startDmg,_endDmg); INFO_4("Pain Change [%1 -> %2] - BodyPartDamage Change [%3 -> %4]",_startPain,_endPain,_startDmg,_endDmg);

View File

@ -38,7 +38,7 @@ if (!local _unit) exitWith {
}; };
if (_knockOut isEqualTo IS_UNCONSCIOUS(_unit)) exitWith { if (_knockOut isEqualTo IS_UNCONSCIOUS(_unit)) exitWith {
WARNING_2("setUnconscious called with no change [Unit %1] [State [%2]", _unit, _knockOut); WARNING_2("setUnconscious called with no change [Unit %1] [State [%2]",_unit,_knockOut);
false false
}; };

View File

@ -1,7 +1,7 @@
#include "script_component.hpp" #include "script_component.hpp"
["CBA_settingsInitialized", { ["CBA_settingsInitialized", {
TRACE_1("settingsInitialized", GVAR(enabledFor)); TRACE_1("settingsInitialized",GVAR(enabledFor));
if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients

View File

@ -61,7 +61,7 @@ if (isClass (_damageTypesConfig >> "woundHandlers")) then {
_defaultWoundHandlers = [_damageTypesConfig >> "woundHandlers"] call FUNC(parseWoundHandlersCfg); _defaultWoundHandlers = [_damageTypesConfig >> "woundHandlers"] call FUNC(parseWoundHandlersCfg);
reverse _defaultWoundHandlers; reverse _defaultWoundHandlers;
}; };
TRACE_1("Found default wound handlers", count _defaultWoundHandlers); TRACE_1("Found default wound handlers",count _defaultWoundHandlers);
// Collect all available damage types from the config // Collect all available damage types from the config
{ {
@ -82,10 +82,10 @@ TRACE_1("Found default wound handlers", count _defaultWoundHandlers);
if (isClass (_damageTypeSubClassConfig >> "woundHandlers")) then { if (isClass (_damageTypeSubClassConfig >> "woundHandlers")) then {
_woundHandlers = [_damageTypeSubClassConfig >> "woundHandlers"] call FUNC(parseWoundHandlersCfg); _woundHandlers = [_damageTypeSubClassConfig >> "woundHandlers"] call FUNC(parseWoundHandlersCfg);
reverse _woundHandlers; reverse _woundHandlers;
TRACE_2("Damage type found wound handlers", _className, count _woundHandlers); TRACE_2("Damage type found wound handlers",_className,count _woundHandlers);
} else { } else {
_woundHandlers = _defaultWoundHandlers; _woundHandlers = _defaultWoundHandlers;
TRACE_1("Damage type has no wound handlers, using default", _className); TRACE_1("Damage type has no wound handlers, using default",_className);
}; };
/* /*
@ -115,11 +115,11 @@ TRACE_1("Found default wound handlers", count _defaultWoundHandlers);
if (_woundType == "woundHandlers") then {continue}; if (_woundType == "woundHandlers") then {continue};
if (_woundType in GVAR(woundDetails)) then { if (_woundType in GVAR(woundDetails)) then {
private _weighting = GET_ARRAY(_x >> "weighting",[[ARR_2(0,1)]]); private _weighting = GET_ARRAY(_x >> "weighting",[[ARR_2(0,1)]]);
private _dmgMulti = GET_NUMBER(_x >> "damageMultiplier", 1); private _dmgMulti = GET_NUMBER(_x >> "damageMultiplier",1);
private _bleedMulti = GET_NUMBER(_x >> "bleedingMultiplier", 1); private _bleedMulti = GET_NUMBER(_x >> "bleedingMultiplier",1);
private _sizeMulti = GET_NUMBER(_x >> "sizeMultiplier", 1); private _sizeMulti = GET_NUMBER(_x >> "sizeMultiplier",1);
private _painMulti = GET_NUMBER(_x >> "painMultiplier", 1); private _painMulti = GET_NUMBER(_x >> "painMultiplier",1);
private _fractureMulti = GET_NUMBER(_x >> "fractureMultiplier", 1); private _fractureMulti = GET_NUMBER(_x >> "fractureMultiplier",1);
_damageWoundDetails pushBack [_woundType, _weighting, _dmgMulti, _bleedMulti, _sizeMulti, _painMulti, _fractureMulti]; _damageWoundDetails pushBack [_woundType, _weighting, _dmgMulti, _bleedMulti, _sizeMulti, _painMulti, _fractureMulti];
} else { } else {
WARNING_2("Damage type %1 refers to wound %2, but it doesn't exist: skipping.",_className,configName _x); WARNING_2("Damage type %1 refers to wound %2, but it doesn't exist: skipping.",_className,configName _x);

View File

@ -26,10 +26,9 @@ if (_typeOfDamage in GVAR(damageTypeDetails)) then {
private _damageData = [_unit, _allDamages, _typeOfDamage]; private _damageData = [_unit, _allDamages, _typeOfDamage];
{ {
_damageData = _damageData call _x; _damageData = _damageData call _x;
TRACE_1("Wound handler returned", _damageData); TRACE_1("Wound handler returned",_damageData);
if !(_damageData isEqualType [] && {(count _damageData) >= 3}) exitWith { if !(_damageData isEqualType [] && {(count _damageData) >= 3}) exitWith {
TRACE_1("Return invalid, terminating wound handling", _damageData); TRACE_1("Return invalid, terminating wound handling",_damageData);
}; };
} forEach _woundHandlers; } forEach _woundHandlers;
}; };

View File

@ -24,5 +24,5 @@ private _newDamages = _allDamages apply {
[_x select 0, selectRandom ALL_BODY_PARTS, _x select 2]; [_x select 0, selectRandom ALL_BODY_PARTS, _x select 2];
}; };
TRACE_1("Vehicle crash handled, passing damage", _newDamages); TRACE_1("Vehicle crash handled, passing damage",_newDamages);
[_unit, _newDamages, _typeOfDamage] //return [_unit, _newDamages, _typeOfDamage] //return

View File

@ -42,5 +42,5 @@ private _newDamages = [];
_newDamages pushBack [_damageMap get _x, _x, _damageToApply]; _newDamages pushBack [_damageMap get _x, _x, _damageToApply];
} forEach (keys _damageMap); // micro-optimization again, two 'get's is still faster than iterating over a hashmap } forEach (keys _damageMap); // micro-optimization again, two 'get's is still faster than iterating over a hashmap
TRACE_1("Vehicle explosion handled, passing damage", _newDamages); TRACE_1("Vehicle explosion handled, passing damage",_newDamages);
[_unit, _newDamages, _typeOfDamage] //return [_unit, _newDamages, _typeOfDamage] //return

View File

@ -13,7 +13,7 @@
// Check if last hit point is our dummy. // Check if last hit point is our dummy.
private _allHitPoints = getAllHitPointsDamage _unit param [0, []]; private _allHitPoints = getAllHitPointsDamage _unit param [0, []];
reverse _allHitPoints; reverse _allHitPoints;
while {(_allHitPoints param [0, ""]) select [0,1] == "#"} do { WARNING_1("Ignoring Reflector hitpoint %1", _allHitPoints deleteAt 0); }; while {(_allHitPoints param [0, ""]) select [0,1] == "#"} do { WARNING_1("Ignoring Reflector hitpoint %1",_allHitPoints deleteAt 0); };
if (_allHitPoints param [0, ""] != "ACE_HDBracket") then { if (_allHitPoints param [0, ""] != "ACE_HDBracket") then {
if (unitIsUAV _unit) exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (unitIsUAV _unit) exitWith {TRACE_1("ignore UAV AI",typeOf _unit);};
@ -32,7 +32,7 @@
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
[QEGVAR(medical,woundReceived), { [QEGVAR(medical,woundReceived), {
params ["_unit", "_damages", "_shooter", "_ammo"]; params ["_unit", "_damages", "_shooter", "_ammo"];
TRACE_4("wound",_unit,_damages, _shooter, _ammo); TRACE_4("wound",_unit,_damages,_shooter,_ammo);
//systemChat str _this; //systemChat str _this;
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
#endif #endif

View File

@ -90,8 +90,8 @@ if (
{_ammo isNotEqualTo ""} && {_ammo isNotEqualTo ""} &&
{ {
private _ammoCfg = configFile >> "CfgAmmo" >> _ammo; private _ammoCfg = configFile >> "CfgAmmo" >> _ammo;
GET_NUMBER(_ammoCfg >> "explosive", 0) > 0 || GET_NUMBER(_ammoCfg >> "explosive",0) > 0 ||
{GET_NUMBER(_ammoCfg >> "indirectHit", 0) > 0} {GET_NUMBER(_ammoCfg >> "indirectHit",0) > 0}
} }
) exitwith { ) exitwith {
TRACE_5("Vehicle hit",_unit,_shooter,_instigator,_damage,_newDamage); TRACE_5("Vehicle hit",_unit,_shooter,_instigator,_damage,_newDamage);

View File

@ -22,8 +22,8 @@ GVAR(actions) = [];
private _configName = configName _x; private _configName = configName _x;
private _displayName = getText (_x >> "displayName"); private _displayName = getText (_x >> "displayName");
private _category = getText (_x >> "category"); private _category = getText (_x >> "category");
private _condition = compile format [QUOTE([ARR_4(ACE_player, GVAR(target), %1 select GVAR(selectedBodyPart), '%2')] call DEFUNC(medical_treatment,canTreatCached)), ALL_BODY_PARTS, _configName]; private _condition = compile format [QUOTE([ARR_4(ACE_player,GVAR(target),%1 select GVAR(selectedBodyPart),'%2')] call DEFUNC(medical_treatment,canTreatCached)), ALL_BODY_PARTS, _configName];
private _statement = compile format [QUOTE([ARR_4(ACE_player, GVAR(target), %1 select GVAR(selectedBodyPart), '%2')] call DEFUNC(medical_treatment,treatment)), ALL_BODY_PARTS, _configName]; private _statement = compile format [QUOTE([ARR_4(ACE_player,GVAR(target),%1 select GVAR(selectedBodyPart),'%2')] call DEFUNC(medical_treatment,treatment)), ALL_BODY_PARTS, _configName];
private _items = getArray (_x >> "items"); private _items = getArray (_x >> "items");
GVAR(actions) pushBack [_displayName, _category, _condition, _statement, _items]; GVAR(actions) pushBack [_displayName, _category, _condition, _statement, _items];

View File

@ -36,7 +36,7 @@ if (isClass (_config >> _bandage)) then {
_reopeningMinDelay = getNumber (_config >> "reopeningMinDelay"); _reopeningMinDelay = getNumber (_config >> "reopeningMinDelay");
_reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay; _reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay;
} else { } else {
WARNING_2("No config for bandage [%1] config base [%2]", _bandage, _config); WARNING_2("No config for bandage [%1] config base [%2]",_bandage,_config);
}; };
if (isClass (_config >> _className)) then { if (isClass (_config >> _className)) then {
@ -54,7 +54,7 @@ if (isClass (_config >> _className)) then {
_reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay; _reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay;
}; };
} else { } else {
WARNING_2("No config for wound type [%1] config base [%2]", _className, _config); WARNING_2("No config for wound type [%1] config base [%2]",_className,_config);
}; };
TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay); TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay);

View File

@ -21,7 +21,7 @@ params ["_unit"];
private _fnc_check = { private _fnc_check = {
private _position = _unit modelToWorldVisual [0, 0, eyePos _unit select 2]; private _position = _unit modelToWorldVisual [0, 0, eyePos _unit select 2];
CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position, _position vectorAdd [ARR_3(0, 0, 10)], _unit)]) || {CHECK_OBJECTS(_unit nearObjects 7.5)} CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position,_position vectorAdd [ARR_3(0,0,10)],_unit)]) || {CHECK_OBJECTS(_unit nearObjects 7.5)}
}; };
[[], _fnc_check, _unit, QGVAR(inMedicalFacilityCache), IN_MEDICAL_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall); [[], _fnc_check, _unit, QGVAR(inMedicalFacilityCache), IN_MEDICAL_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall);

View File

@ -49,7 +49,7 @@ private _distance = -1;
if (_isDetectable && {!isNull _x}) exitWith { if (_isDetectable && {!isNull _x}) exitWith {
_distance = _detectorPointAGL distance _x; _distance = _detectorPointAGL distance _x;
_mine = _x; _mine = _x;
TRACE_3("return", _isDetectable, _mine, _distance); TRACE_3("return",_isDetectable,_mine,_distance);
}; };
} forEach _nearestObjects; } forEach _nearestObjects;

View File

@ -39,7 +39,7 @@ private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
private _distanceToShooter = _projectilePos vectorDistance _shooterPos; private _distanceToShooter = _projectilePos vectorDistance _shooterPos;
private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
TRACE_2("", _distanceToTarget, _distanceToShooter); TRACE_2("",_distanceToTarget,_distanceToShooter);
// Add height depending on distance for compensate // Add height depending on distance for compensate
private _returnTargetPos = _seekerTargetPos; private _returnTargetPos = _seekerTargetPos;
@ -69,5 +69,5 @@ switch (_attackProfileStateParams select 0) do {
}; };
}; };
TRACE_1("Adjusted target position", _returnTargetPos); TRACE_1("Adjusted target position",_returnTargetPos);
_returnTargetPos; _returnTargetPos;

View File

@ -39,7 +39,7 @@ private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
private _distanceToShooter = _projectilePos vectorDistance _shooterPos; private _distanceToShooter = _projectilePos vectorDistance _shooterPos;
private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
TRACE_2("", _distanceToTarget, _distanceToShooter); TRACE_2("",_distanceToTarget,_distanceToShooter);
// Add height depending on distance for compensate // Add height depending on distance for compensate
private _returnTargetPos = _seekerTargetPos; private _returnTargetPos = _seekerTargetPos;
@ -58,7 +58,7 @@ switch( (_attackProfileStateParams select 0) ) do {
private _cruisAlt = 140; private _cruisAlt = 140;
if (_distanceShooterToTarget < 1250) then { if (_distanceShooterToTarget < 1250) then {
_cruisAlt = 140 * (_distanceShooterToTarget/1250); _cruisAlt = 140 * (_distanceShooterToTarget/1250);
TRACE_1("_cruisAlt", _cruisAlt); TRACE_1("_cruisAlt",_cruisAlt);
}; };
if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then { if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then {
if (_cruisAlt < 140) then { if (_cruisAlt < 140) then {
@ -72,7 +72,7 @@ switch( (_attackProfileStateParams select 0) ) do {
}; };
case STAGE_COAST: { case STAGE_COAST: {
TRACE_1("STAGE_COAST",""); TRACE_1("STAGE_COAST","");
TRACE_1("", ((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2) ); TRACE_1("",((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2));
if (_distanceToTarget < ( ((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2) ) * 2) then { if (_distanceToTarget < ( ((ASLToAGL _projectilePos) select 2) - (( ASLToAGL _seekerTargetPos) select 2) ) * 2) then {
_attackProfileStateParams set [0, STAGE_TERMINAL]; _attackProfileStateParams set [0, STAGE_TERMINAL];
} else { } else {
@ -86,5 +86,5 @@ switch( (_attackProfileStateParams select 0) ) do {
}; };
}; };
TRACE_1("Adjusted target position", _returnTargetPos); TRACE_1("Adjusted target position",_returnTargetPos);
_returnTargetPos; _returnTargetPos;

View File

@ -30,7 +30,7 @@ private _distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
private _distanceToShooter = _projectilePos vectorDistance _shooterPos; private _distanceToShooter = _projectilePos vectorDistance _shooterPos;
private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos; private _distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
TRACE_2("", _distanceToTarget, _distanceToShooter); TRACE_2("",_distanceToTarget,_distanceToShooter);
// Add height depending on distance for compensate // Add height depending on distance for compensate
private _addHeight = [0,0,0]; private _addHeight = [0,0,0];

View File

@ -37,7 +37,7 @@ private _adjustTime = 1;
if (accTime > 0) then { if (accTime > 0) then {
_adjustTime = 1/accTime; _adjustTime = 1/accTime;
_adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR); _adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR);
TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) ); TRACE_4("Adjust timing",1/accTime,_adjustTime,_runtimeDelta,(_runtimeDelta / TIMESTEP_FACTOR));
} else { } else {
_adjustTime = 0; _adjustTime = 0;
}; };
@ -89,8 +89,8 @@ if ((_minDeflection != 0 || {_maxDeflection != 0}) && {_profileAdjustedTargetPos
}; };
private _finalAdjustVector = [_yaw, _roll, _pitch]; private _finalAdjustVector = [_yaw, _roll, _pitch];
TRACE_3("", _pitch, _yaw, _roll); TRACE_3("",_pitch,_yaw,_roll);
TRACE_3("", _targetVector, _adjustVector, _finalAdjustVector); TRACE_3("",_targetVector,_adjustVector,_finalAdjustVector);
if (accTime > 0) then { if (accTime > 0) then {
private _changeVector = (vectorDir _projectile) vectorAdd _finalAdjustVector; private _changeVector = (vectorDir _projectile) vectorAdd _finalAdjustVector;

View File

@ -71,14 +71,14 @@ if (isNil "_target") then {
if (!isPlayer _shooter) then { if (!isPlayer _shooter) then {
// This was an AI shot, lets still guide it on the AI target // This was an AI shot, lets still guide it on the AI target
_target = _shooter getVariable [QGVAR(vanilla_target), nil]; _target = _shooter getVariable [QGVAR(vanilla_target), nil];
TRACE_1("Detected AI Shooter!", _target); TRACE_1("Detected AI Shooter!",_target);
} else { } else {
private _canUseLock = getNumber (_config >> "canVanillaLock"); private _canUseLock = getNumber (_config >> "canVanillaLock");
// @TODO: Get vanilla target // @TODO: Get vanilla target
if (_canUseLock > 0 || difficulty < 1) then { if (_canUseLock > 0 || difficulty < 1) then {
private _vanillaTarget = cursorTarget; private _vanillaTarget = cursorTarget;
TRACE_1("Using Vanilla Locking", _vanillaTarget); TRACE_1("Using Vanilla Locking",_vanillaTarget);
if (!isNil "_vanillaTarget") then { if (!isNil "_vanillaTarget") then {
_target = _vanillaTarget; _target = _vanillaTarget;
}; };

View File

@ -34,12 +34,12 @@ private _losOkay = false;
if (_angleOkay) then { if (_angleOkay) then {
_losOkay = [_projectile, _target] call FUNC(checkLos); _losOkay = [_projectile, _target] call FUNC(checkLos);
}; };
TRACE_2("", _angleOkay, _losOkay); TRACE_2("",_angleOkay,_losOkay);
// Can't see target, return [0,0,0] and let doSeekerSearch handle it // Can't see target, return [0,0,0] and let doSeekerSearch handle it
if (!_angleOkay || !_losOkay) exitWith {[0,0,0]}; if (!_angleOkay || !_losOkay) exitWith {[0,0,0]};
TRACE_2("", _target, _foundTargetPos); TRACE_2("",_target,_foundTargetPos);
// @TODO: Configurable lead for seekers // @TODO: Configurable lead for seekers
private _projectileSpeed = (vectorMagnitude velocity _projectile); private _projectileSpeed = (vectorMagnitude velocity _projectile);
private _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; private _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos;

View File

@ -27,6 +27,6 @@ _laserParams params ["_code", "_wavelengthMin", "_wavelengthMax"];
private _laserResult = [(getPosASL _projectile), (velocity _projectile), _seekerAngle, _seekerMaxRange, [_wavelengthMin, _wavelengthMax], _code, _projectile] call EFUNC(laser,seekerFindLaserSpot); private _laserResult = [(getPosASL _projectile), (velocity _projectile), _seekerAngle, _seekerMaxRange, [_wavelengthMin, _wavelengthMax], _code, _projectile] call EFUNC(laser,seekerFindLaserSpot);
private _foundTargetPos = _laserResult select 0; private _foundTargetPos = _laserResult select 0;
TRACE_1("Search", _laserResult); TRACE_1("Search",_laserResult);
_foundTargetPos; _foundTargetPos;

View File

@ -55,7 +55,7 @@ if (_proxyWeaponNeeded || GVAR(useAmmoHandling)) then {
}; };
}; };
} else { } else {
WARNING_1("unknown mag %1", _xMag); WARNING_1("unknown mag %1",_xMag);
}; };
}; };
} forEach (magazinesAllTurrets _mortar); } forEach (magazinesAllTurrets _mortar);

View File

@ -26,7 +26,7 @@
_function = missionNamespace getVariable _function; _function = missionNamespace getVariable _function;
}; };
if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit?
WARNING_1("Module [%1] - More than 1 singular module placed", _logicType); WARNING_1("Module [%1] - More than 1 singular module placed",_logicType);
}; };
if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;}; if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;};

View File

@ -21,7 +21,7 @@
* Public: No * Public: No
*/ */
TRACE_1("drawName:", _this); TRACE_1("drawName:",_this);
params ["", "_target", "", "_heightOffset"]; params ["", "_target", "", "_heightOffset"];

Some files were not shown because too many files have changed in this diff Show More