From 3417c433fd61dd3a3514ab31b7e375f5960292a1 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Wed, 9 Nov 2016 22:06:48 +0100 Subject: [PATCH 01/26] Prep v3.8.2 --- addons/main/script_version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 1bc29e4831..95d44ca2c9 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 #define MINOR 8 -#define PATCHLVL 1 +#define PATCHLVL 2 #define BUILD 11 From 0394ea56b492dce4db25efaae3e8f38c47ed0405 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Wed, 9 Nov 2016 22:07:07 +0100 Subject: [PATCH 02/26] Increment build --- addons/main/script_version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 95d44ca2c9..2104cda997 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 #define MINOR 8 #define PATCHLVL 2 -#define BUILD 11 +#define BUILD 12 From c756537d3d21cc3622e82f7db19a2dd7e5af1b06 Mon Sep 17 00:00:00 2001 From: ulteq Date: Thu, 10 Nov 2016 18:35:57 +0100 Subject: [PATCH 03/26] ATragMX - Estimate bullet length instead of using a fixed value (#4651) --- addons/atragmx/functions/fnc_calculate_target_solution.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/atragmx/functions/fnc_calculate_target_solution.sqf b/addons/atragmx/functions/fnc_calculate_target_solution.sqf index 8bd844938f..efb92ebaf1 100644 --- a/addons/atragmx/functions/fnc_calculate_target_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_solution.sqf @@ -52,7 +52,7 @@ if (!GVAR(atmosphereModeTBH)) then { }; private ["_bulletLength", "_stabilityFactor"]; -_bulletLength = 45.72; +_bulletLength = 50 * _bulletMass / ((_bulletDiameter/2)^2); _stabilityFactor = 1.5; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { From 47e1444747d69574843c506f519b6f8ec0809d81 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 5 Nov 2016 14:20:48 +0000 Subject: [PATCH 04/26] Fix #4630 Not all explosives detonate on destruction, so their ammo config must be checked to see if they will. ACE_Explosives adds a property to define the associated ammo which *will* detonate on destruction, which is used if present. Otherwise a generic small explosion happens. --- .../functions/fnc_detonateAmmunition.sqf | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index 211e359bb3..5a29bf4f8a 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -33,15 +33,16 @@ if (_amountOfMagazines > 0) exitWith { } else { _magazine set [1, _newMagCount]; // clear out the magazine }; - private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "ammo"); - private _timeBetweenAmmoDetonation = (random 7) * (1 / random (_amountOfMagazines)) min MAX_TIME_BETWEEN_AMMO_DET; _timeBetweenAmmoDetonation = _timeBetweenAmmoDetonation max 0.1; + private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "ammo"); + private _ammoCfg = (configFile >> "CfgAmmo" >> _ammo); + private _speedOfAmmo = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "initSpeed"); - private _simulationTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "simulation"); - private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber"); - private _simType = getText (configFile >> "CfgAmmo" >> _ammo >> "simulation"); + private _simulationTime = getNumber (_ammoCfg >> "simulation"); + private _caliber = getNumber (_ammoCfg >> "caliber"); + private _simType = getText (_ammoCfg >> "simulation"); private _effect2pos = _vehicle selectionPosition "destructionEffect2"; @@ -91,7 +92,7 @@ if (_amountOfMagazines > 0) exitWith { }; [_vehicle, _ammo, _speed, random 1 < 0.5] call _spawnProjectile; }; - if (toLower _simType == "shotrocket" || {toLower _simType == "shotmissile"}) then { + if (toLower _simType in ["shotrocket", "shotmissile", "shotsubmunitions"]) then { if (random 1 < 0.1) then { private _sound = selectRandom [QUOTE(PATHTO_R(sounds\cannon_crack_close.wss)), QUOTE(PATHTO_R(sounds\cannon_crack_close_filtered.wss))]; playSound3D [_sound, objNull, false, (getPosASL _vehicle), 3, 1, 1600]; @@ -101,9 +102,25 @@ if (_amountOfMagazines > 0) exitWith { "ACE_ammoExplosionLarge" createvehicle (_vehicle modelToWorld _effect2pos); }; }; - if (toLower _simType in ["shotdirectionalbomb", "shotilluminating", "shotmine"]) then { + if (toLower _simType in ["shotdirectionalbomb", "shotmine"]) then { if (random 1 < 0.5) then { - [_vehicle, _ammo, 0, false] call _spawnProjectile; + // Not all explosives detonate on destruction, some have scripted alternatives + private _scripted = getNumber (_ammoCfg >> "triggerWhenDestroyed") == 1; + if !(_scripted) then { + _ammo = getText (_ammoCfg >> "ace_explosives_Explosive"); + }; + + // If a scripted alternative doesn't exist use generic explosion + if (_ammo != "") then { + [_vehicle, _ammo, 0, false] call _spawnProjectile; + } else { + "SmallSecondary" createvehicle (_vehicle modelToWorld _effect2pos); + }; + }; + }; + if (toLower _simType == "shotilluminating") then { + if (random 1 < 0.15) then { + [_vehicle, _ammo, _speed, random 1 < 0.3] call _spawnProjectile; }; }; From 5976415b0d4893798af02b15a8b77c5addc4a36d Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 5 Nov 2016 14:48:48 +0000 Subject: [PATCH 05/26] Add cook off 3den setting to ammo boxes --- addons/cookoff/CfgEden.hpp | 2 +- addons/cookoff/XEH_postInit.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/cookoff/CfgEden.hpp b/addons/cookoff/CfgEden.hpp index 1cc406463f..55e9b6d8b8 100644 --- a/addons/cookoff/CfgEden.hpp +++ b/addons/cookoff/CfgEden.hpp @@ -11,7 +11,7 @@ class Cfg3DEN { tooltip = CSTRING(enable_tooltip); expression = QUOTE(if !(_value) then {_this setVariable [ARR_3('%s',_value,true)];};); typeName = "BOOL"; - condition = "objectVehicle"; + condition = "objectVehicle + objectHasInventoryCargo"; defaultValue = "(true)"; // fix pbo project preprocessing bug }; }; diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index fe98faa2be..4e65bf8886 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -71,7 +71,7 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace; ["ReammoBox_F", "init", { (_this select 0) addEventHandler ["HandleDamage", { - if (GVAR(enableAmmobox)) then { + if ((_this select 0) getVariable [QGVAR(enable), GVAR(enableAmmobox)]) then { ["box", _this] call FUNC(handleDamage); }; }]; From 27cc4ed7c0a136fc0b49b64993d11f0d8fcaa637 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 6 Nov 2016 12:24:00 +0000 Subject: [PATCH 06/26] Clean some cook off code - Use unary `createVehicle` syntax - Removed some parenthesis - Simpify 3den property condition --- addons/cookoff/CfgEden.hpp | 2 +- addons/cookoff/functions/fnc_detonateAmmunition.sqf | 10 +++++----- addons/cookoff/functions/fnc_secondaryExplosions.sqf | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/cookoff/CfgEden.hpp b/addons/cookoff/CfgEden.hpp index 55e9b6d8b8..aa550a9228 100644 --- a/addons/cookoff/CfgEden.hpp +++ b/addons/cookoff/CfgEden.hpp @@ -11,7 +11,7 @@ class Cfg3DEN { tooltip = CSTRING(enable_tooltip); expression = QUOTE(if !(_value) then {_this setVariable [ARR_3('%s',_value,true)];};); typeName = "BOOL"; - condition = "objectVehicle + objectHasInventoryCargo"; + condition = "objectHasInventoryCargo"; defaultValue = "(true)"; // fix pbo project preprocessing bug }; }; diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index 5a29bf4f8a..d7d7114e7d 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -37,7 +37,7 @@ if (_amountOfMagazines > 0) exitWith { _timeBetweenAmmoDetonation = _timeBetweenAmmoDetonation max 0.1; private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "ammo"); - private _ammoCfg = (configFile >> "CfgAmmo" >> _ammo); + private _ammoCfg = configFile >> "CfgAmmo" >> _ammo; private _speedOfAmmo = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "initSpeed"); private _simulationTime = getNumber (_ammoCfg >> "simulation"); @@ -53,8 +53,8 @@ if (_amountOfMagazines > 0) exitWith { if (_spawnPos select 2 < 0) then { _spawnPos set [2, 0]; }; - private _projectile = _ammo createVehicle [0,0,0]; - _projectile setPos _spawnPos; + + private _projectile = createVehicle [_ammo, _spawnPos, [], 0, "CAN_COLLIDE"]; if (_flyAway) then { private _vectorAmmo = [(-1 + (random 2)), (-1 + (random 2)), -0.2 + (random 1)]; private _velVec = _vectorAmmo vectorMultiply _speed; @@ -99,7 +99,7 @@ if (_amountOfMagazines > 0) exitWith { [_vehicle, _ammo, _speed, random 1 < 0.3] call _spawnProjectile; } else { - "ACE_ammoExplosionLarge" createvehicle (_vehicle modelToWorld _effect2pos); + createvehicle ["ACE_ammoExplosionLarge", (_vehicle modelToWorld _effect2pos), [], 0 , "CAN_COLLIDE"]; }; }; if (toLower _simType in ["shotdirectionalbomb", "shotmine"]) then { @@ -114,7 +114,7 @@ if (_amountOfMagazines > 0) exitWith { if (_ammo != "") then { [_vehicle, _ammo, 0, false] call _spawnProjectile; } else { - "SmallSecondary" createvehicle (_vehicle modelToWorld _effect2pos); + createvehicle ["SmallSecondary", (_vehicle modelToWorld _effect2pos), [], 0 , "CAN_COLLIDE"]; }; }; }; diff --git a/addons/cookoff/functions/fnc_secondaryExplosions.sqf b/addons/cookoff/functions/fnc_secondaryExplosions.sqf index 01a2fa3b3f..34a1d28ea8 100644 --- a/addons/cookoff/functions/fnc_secondaryExplosions.sqf +++ b/addons/cookoff/functions/fnc_secondaryExplosions.sqf @@ -44,7 +44,7 @@ private _fnc_secondaryExplosion = { private _position = _vehicle modelToWorld (_vehicle selectionPosition "destructionEffect2"); // these CfgAmmo objects are always global - "SmallSecondary" createVehicle _position; + createVehicle ["SmallSecondary", _position, [], 0, "CAN_COLLIDE"]; DEC(_amount); From 1f6ce7ff813ad771322840c65ffbe9ad65affaba Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 12 Nov 2016 15:46:29 -0600 Subject: [PATCH 07/26] Fix tagTestingThread error (#4662) Close #4659 --- addons/tagging/functions/fnc_tagTestingThread.sqf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/tagging/functions/fnc_tagTestingThread.sqf b/addons/tagging/functions/fnc_tagTestingThread.sqf index ead21f8d91..a21cf69f2b 100644 --- a/addons/tagging/functions/fnc_tagTestingThread.sqf +++ b/addons/tagging/functions/fnc_tagTestingThread.sqf @@ -27,12 +27,13 @@ GVAR(tagsToTest) = GVAR(tagsToTest) select { private _intersections = lineIntersectsSurfaces [_tagPosASL, _endPosASL, _tag, objNull, true, 1, "GEOM", "FIRE"]; // If there's no intersections - if (_intersections isEqualTo []) exitWith { + if (_intersections isEqualTo []) then { TRACE_1("No intersections, deleting:",_tag); deleteVehicle _tag; false + } else { + true }; - true }; // If there's no more tag From e73d20f3c3cf88726e1441fb6f814d0a2199a1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brostr=C3=B6m=2EA=20=7C=20Evul?= Date: Sat, 12 Nov 2016 23:19:50 +0100 Subject: [PATCH 08/26] ACE_Chemlight_Shield not public (#4612) Changed `ACE_Chemlight_Shield` to `public` from `protected` --- addons/chemlights/CfgWeapons.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/chemlights/CfgWeapons.hpp b/addons/chemlights/CfgWeapons.hpp index de5fc8aea5..c182ded34b 100644 --- a/addons/chemlights/CfgWeapons.hpp +++ b/addons/chemlights/CfgWeapons.hpp @@ -44,7 +44,7 @@ class CfgWeapons { descriptionShort = CSTRING(Shield_Empty_DescriptionShort); model = "\A3\weapons_F\ammo\mag_univ.p3d"; picture = QPATHTOF(UI\ace_chemlight_shield_x_ca.paa); - scope = 1; + scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; }; From c2e933355dbd7027f2f877f561571233e7fa5501 Mon Sep 17 00:00:00 2001 From: jonpas Date: Wed, 2 Nov 2016 18:44:39 +0100 Subject: [PATCH 09/26] Prevent switching to weapon while carrying fuel nozzle - fix #4601 --- addons/refuel/XEH_PREP.hpp | 1 + addons/refuel/XEH_postInit.sqf | 1 + .../fnc_handlePlayerWeaponChanged.sqf | 29 +++++++++++++++++++ .../functions/fnc_maxDistanceDropNozzle.sqf | 4 +++ 4 files changed, 35 insertions(+) create mode 100644 addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf diff --git a/addons/refuel/XEH_PREP.hpp b/addons/refuel/XEH_PREP.hpp index 806d861a69..282b008fca 100644 --- a/addons/refuel/XEH_PREP.hpp +++ b/addons/refuel/XEH_PREP.hpp @@ -14,6 +14,7 @@ PREP(dropNozzle); PREP(getFuel); PREP(handleDisconnect); PREP(handleKilled); +PREP(handlePlayerWeaponChanged); PREP(handleUnconscious); PREP(makeJerryCan); PREP(maxDistanceDropNozzle); diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf index 89a1f3dc45..f0fb928187 100644 --- a/addons/refuel/XEH_postInit.sqf +++ b/addons/refuel/XEH_postInit.sqf @@ -1,6 +1,7 @@ #include "script_component.hpp" ["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; +["weapon", FUNC(handlePlayerWeaponChanged)] call CBA_fnc_addPlayerEventHandler; if (isServer) then { addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleDisconnect)}]; diff --git a/addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf b/addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf new file mode 100644 index 0000000000..57897aef89 --- /dev/null +++ b/addons/refuel/functions/fnc_handlePlayerWeaponChanged.sqf @@ -0,0 +1,29 @@ +/* + * Author: Jonpas + * Drops nozzle or jerry can when selecting a weapon. + * + * Arguments: + * 0: Unit + * 1: Weapon (unused) + * + * Return Value: + * None + * + * Example: + * [_unit, "gun"] call ace_refuel_fnc_handlePlayerWeaponChanged; + * + * Public: No +*/ +#include "script_component.hpp" + +params ["_unit"]; + +// Drop nozzle/jerry can when selecting a non-primary weapon +if (_unit getVariable [QGVAR(isRefueling), false]) then { + private _nozzle = _unit getVariable [QGVAR(nozzle), objNull]; + if !(isNull _nozzle) then { + [_unit, _nozzle] call FUNC(dropNozzle); + _unit setVariable [QGVAR(selectedWeaponOnRefuel), nil]; + [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); + }; +}; diff --git a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf index 90231a30f2..687af9e072 100644 --- a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf +++ b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf @@ -33,6 +33,10 @@ if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; ["_nozzle", (_args select 0) getVariable [QGVAR(nozzle), objNull], [objNull]] ]; + if (_unit getVariable [QGVAR(isRefueling), false]) exitWith { + [_pfID] call CBA_fnc_removePerFrameHandler; + }; + if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (REFUEL_HOSE_LENGTH - 2)} || {!alive _source}) exitWith { if !(isNull _nozzle) then { [_unit, _nozzle] call FUNC(dropNozzle); From ed061d66bad218b1d7b11d98a3e8ec6a9b3cfec7 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 12 Nov 2016 16:37:41 -0600 Subject: [PATCH 10/26] Invert logic for isRefueling --- addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf index 687af9e072..2a23b5eb99 100644 --- a/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf +++ b/addons/refuel/functions/fnc_maxDistanceDropNozzle.sqf @@ -33,7 +33,8 @@ if (_nozzle getVariable [QGVAR(jerryCan), false]) exitWith {}; ["_nozzle", (_args select 0) getVariable [QGVAR(nozzle), objNull], [objNull]] ]; - if (_unit getVariable [QGVAR(isRefueling), false]) exitWith { + if (!(_unit getVariable [QGVAR(isRefueling), false])) exitWith { + TRACE_1("player not isRefueling",_unit); [_pfID] call CBA_fnc_removePerFrameHandler; }; From fa36955ffbfd41b26c72b5661e6008e4a4fbedc9 Mon Sep 17 00:00:00 2001 From: Daniel Jupp Date: Sat, 12 Nov 2016 17:52:17 -0600 Subject: [PATCH 11/26] Fix cargo find nearest vehicle (#4592) * Inital Commit * read function call change added object to exclude to function call * Removed TODO comment --- addons/cargo/functions/fnc_canLoad.sqf | 2 +- addons/cargo/functions/fnc_canLoadItemIn.sqf | 5 +++ .../functions/fnc_findNearestVehicle.sqf | 32 +++++++++++-------- addons/cargo/functions/fnc_startLoadIn.sqf | 2 +- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/addons/cargo/functions/fnc_canLoad.sqf b/addons/cargo/functions/fnc_canLoad.sqf index f576ea3e79..e0fd172eef 100644 --- a/addons/cargo/functions/fnc_canLoad.sqf +++ b/addons/cargo/functions/fnc_canLoad.sqf @@ -21,7 +21,7 @@ TRACE_2("params",_player,_object); if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false}; -private _nearestVehicle = [_player] call FUNC(findNearestVehicle); +private _nearestVehicle = [_player, _object] call FUNC(findNearestVehicle); if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then { { diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index e2bb1ecc4d..77a230108c 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -20,6 +20,11 @@ params [["_item", "", [objNull,""]], "_vehicle"]; if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}) exitWith {TRACE_1("vehicle not stable",_vehicle); false}; +if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { + TRACE_1("item is occupied",_item); + false +}; + private _itemSize = [_item] call FUNC(getSizeItem); private _validItem = false; if (_item isEqualType "") then { diff --git a/addons/cargo/functions/fnc_findNearestVehicle.sqf b/addons/cargo/functions/fnc_findNearestVehicle.sqf index 6d5b7ce1a8..7981782255 100644 --- a/addons/cargo/functions/fnc_findNearestVehicle.sqf +++ b/addons/cargo/functions/fnc_findNearestVehicle.sqf @@ -1,35 +1,41 @@ /* * Author: Glowbal - * Get nearest vehicle from unit, priority: Car-Air-Tank-Ship. + * Get nearest vehicle from unit that is not excluded, priority: Car-Air-Tank-Ship. * * Arguments: * 0: Unit + * 1: Object to exclude * * Return Value: * Vehicle in Distance * * Example: - * [unit] call ace_cargo_fnc_findNearestVehicle + * [unit, object] call ace_cargo_fnc_findNearestVehicle * * Public: No */ #include "script_component.hpp" -params ["_unit"]; +params ["_unit","_object"]; -private _loadCar = nearestObject [_unit, "car"]; -if (_unit distance _loadCar <= MAX_LOAD_DISTANCE) exitWith {_loadCar}; +private _loadCar = nearestObjects [_unit, ["car"], MAX_LOAD_DISTANCE]; +_loadCar deleteAt (_loadCar find _object); +if !(_loadCar isEqualTo []) exitWith {_loadCar select 0}; -private _loadHelicopter = nearestObject [_unit, "air"]; -if (_unit distance _loadHelicopter <= MAX_LOAD_DISTANCE) exitWith {_loadHelicopter}; +private _loadHelicopter = nearestObjects [_unit, ["air"], MAX_LOAD_DISTANCE]; +_loadHelicopter deleteAt (_loadHelicopter find _object); +if !(_loadHelicopter isEqualTo []) exitWith {_loadHelicopter select 0}; -private _loadTank = nearestObject [_unit, "tank"]; -if (_unit distance _loadTank <= MAX_LOAD_DISTANCE) exitWith {_loadTank}; +private _loadTank = nearestObjects [_unit, ["tank"], MAX_LOAD_DISTANCE]; +_loadTank deleteAt (_loadTank find _object); +if !(_loadTank isEqualTo []) exitWith {_loadTank select 0}; -private _loadShip = nearestObject [_unit, "ship"]; -if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip}; +private _loadShip = nearestObjects [_unit, ["ship"], MAX_LOAD_DISTANCE]; +_loadShip deleteAt (_loadShip find _object);; +if !(_loadShip isEqualTo []) exitWith {_loadShip select 0}; -private _loadContainer = nearestObject [_unit,"Cargo_base_F"]; -if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer}; +private _loadContainer = nearestObjects [_unit, ["Cargo_base_F"], MAX_LOAD_DISTANCE]; +_loadContainer deleteAt (_loadContainer find _object); +if !(_loadContainer isEqualTo []) exitWith {_loadContainer select 0}; objNull diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 466471c375..8af411bddd 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -19,7 +19,7 @@ params ["_player", "_object"]; TRACE_2("params",_player,_object); -private _vehicle = [_player] call FUNC(findNearestVehicle); +private _vehicle = [_player, _object] call FUNC(findNearestVehicle); if ((isNull _vehicle) || {_vehicle isKindOf "Cargo_Base_F"}) then { { From 0909d5727e073542354c9666c146b1c48148a90e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 12 Nov 2016 19:39:40 -0600 Subject: [PATCH 12/26] Don't compile action menu for playable logics (#4666) Fix #4664 --- addons/interact_menu/functions/fnc_compileMenu.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 78232af4e2..225ebc59b4 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -99,6 +99,11 @@ private _recurseFnc = { _actions }; +if ((getNumber (configFile >> "CfgVehicles" >> _objectType >> "isPlayableLogic")) == 1) exitWith { + TRACE_1("skipping playable logic",_objectType); + _namespace setVariable [_objectType, []]; +}; + private _actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions"; TRACE_1("Building ACE_Actions",_objectType); From 8d9bd5005b3e6b4506b91db8a9305e43b5795ff8 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 10 Nov 2016 17:49:18 -0600 Subject: [PATCH 13/26] Hide advFatigue bar on map / spectator --- addons/advanced_fatigue/XEH_postInit.sqf | 9 +++++---- addons/advanced_fatigue/functions/fnc_mainLoop.sqf | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index d566e3b042..dd68a843c0 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -12,10 +12,11 @@ if (!hasInterface) exitWith {}; GVAR(ppeBlackout) ppEffectCommit 0.4; // - GVAR updating and initialization ----------------------------------------- - if !(isNull ACE_player) then { - [ACE_player, objNull] call FUNC(handlePlayerChanged); - }; - ["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; + ["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; + ["visibleMap", { + private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; + _staminaBarContainer ctrlShow (!visibleMap); + }, true] call CBA_fnc_addPlayerEventHandler; // - Duty factors ------------------------------------------------------------- if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf index f438d6ef08..ee8f33f5c7 100644 --- a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf +++ b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf @@ -11,6 +11,9 @@ #include "script_component.hpp" if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros) [FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; + private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; + _staminaBarContainer ctrlSetFade 1; + _staminaBarContainer ctrlCommit 1; }; private _currentWork = REE; From 948442fafb357e5a4601f79f45851e36c1d6ba1f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 12 Nov 2016 15:51:44 -0600 Subject: [PATCH 14/26] Hide bar when mounted --- addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf index 2f865ac821..476fd23799 100644 --- a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf @@ -13,6 +13,11 @@ params ["_stamina"]; private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; +if ((vehicle ACE_player) != ACE_player) exitWith { // Hide when mounted + _staminaBarContainer ctrlSetFade 1; + _staminaBarContainer ctrlCommit 1; +}; + // - Size --------------------------------------------------------------------- // Shrink the container to cut off the image (other wise it would just get stretched) private _posAndSize = ctrlPosition _staminaBarContainer; From 054831f3705cfd42bd27d84a32cba7e66f5da827 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 13 Nov 2016 10:55:57 -0600 Subject: [PATCH 15/26] Use vehicle eh to hide bar --- addons/advanced_fatigue/XEH_postInit.sqf | 9 ++++++--- .../advanced_fatigue/functions/fnc_handleStaminaBar.sqf | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index dd68a843c0..f64f0a5a81 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -13,10 +13,13 @@ if (!hasInterface) exitWith {}; // - GVAR updating and initialization ----------------------------------------- ["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; - ["visibleMap", { + + private _fnc_showStaminaBar = { private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; - _staminaBarContainer ctrlShow (!visibleMap); - }, true] call CBA_fnc_addPlayerEventHandler; + _staminaBarContainer ctrlShow ((!visibleMap) && {(vehicle ACE_player) == ACE_player}); + }; + ["visibleMap", _fnc_showStaminaBar, true] call CBA_fnc_addPlayerEventHandler; + ["vehicle", _fnc_showStaminaBar, true] call CBA_fnc_addPlayerEventHandler; // - Duty factors ------------------------------------------------------------- if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf index 476fd23799..2f865ac821 100644 --- a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf @@ -13,11 +13,6 @@ params ["_stamina"]; private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; -if ((vehicle ACE_player) != ACE_player) exitWith { // Hide when mounted - _staminaBarContainer ctrlSetFade 1; - _staminaBarContainer ctrlCommit 1; -}; - // - Size --------------------------------------------------------------------- // Shrink the container to cut off the image (other wise it would just get stretched) private _posAndSize = ctrlPosition _staminaBarContainer; From 0669dd6568ead9ce11bf92dba95c6f7f9b7b47e6 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 13 Nov 2016 10:56:45 -0600 Subject: [PATCH 16/26] spaces --- addons/advanced_fatigue/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index f64f0a5a81..57be761607 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -13,7 +13,7 @@ if (!hasInterface) exitWith {}; // - GVAR updating and initialization ----------------------------------------- ["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; - + private _fnc_showStaminaBar = { private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; _staminaBarContainer ctrlShow ((!visibleMap) && {(vehicle ACE_player) == ACE_player}); From d14127ba4fb0af8d660ff5c65a2bfce67ec584ab Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 14 Nov 2016 12:13:41 -0600 Subject: [PATCH 17/26] Use head direction for drawing microdag wp --- addons/microdagr/functions/fnc_mapOnDrawEH.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf index 92d647f348..b3b28775d9 100644 --- a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf +++ b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf @@ -42,7 +42,7 @@ if (GVAR(currentApplicationPage) == 1) then { }; }; if ((count _targetPos) == 3) then { - _relBearing = [ACE_player, _targetPos] call BIS_fnc_relativeDirTo; + _relBearing = (ACE_player getDir _targetPos) - (([ACE_player] call CBA_fnc_headDir) select 0); _theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [1,0.564,0.564,1], DUMMY_POS, _size, _size, _relBearing, '', 0 ]; }; }; From f679b1d6bb75534b568b84b5f3c7e07eaad2b4f1 Mon Sep 17 00:00:00 2001 From: ulteq Date: Wed, 16 Nov 2016 10:49:48 +0100 Subject: [PATCH 18/26] Ballistics - AmmoBox update (Apex magazines) (#4675) * Added 20Rnd 6.5mm Lapua Scenar / Creedmor magazines --- addons/ballistics/CfgVehicles.hpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/addons/ballistics/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp index bb50dcdc2e..5982647778 100644 --- a/addons/ballistics/CfgVehicles.hpp +++ b/addons/ballistics/CfgVehicles.hpp @@ -13,7 +13,9 @@ class CfgVehicles { class NATO_Box_Base; class Box_NATO_Wps_F: NATO_Box_Base { class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); }; }; @@ -34,7 +36,9 @@ class CfgVehicles { class Box_NATO_Ammo_F: NATO_Box_Base { class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); @@ -76,7 +80,9 @@ class CfgVehicles { class ReammoBox_F; class B_supplyCrate_F: ReammoBox_F { class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); @@ -92,7 +98,9 @@ class CfgVehicles { class EAST_Box_Base; class Box_East_Wps_F: EAST_Box_Base { class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -102,7 +110,9 @@ class CfgVehicles { class TransportMagazines { MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -110,7 +120,9 @@ class CfgVehicles { class Box_East_Ammo_F: EAST_Box_Base { class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -118,7 +130,9 @@ class CfgVehicles { class Box_East_Support_F: EAST_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,6); + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); }; @@ -182,7 +196,9 @@ class CfgVehicles { class C_supplyCrate_F: ReammoBox_F { class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); }; }; @@ -217,7 +233,9 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_100Rnd_65x39_caseless_mag_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_200Rnd_65x39_cased_Box_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4); From 264fddd1c4f28dcd808f4c6d4e3176802a77a557 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 14 Nov 2016 19:24:21 +0100 Subject: [PATCH 19/26] Fix AF for adjusted stances, fixes #4591 --- addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf index b91e8a09bf..106ae0c16e 100644 --- a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +++ b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf @@ -22,7 +22,7 @@ private _animType = _animName select [1, 3]; GVAR(isSwimming) = false; -if (_animType in ["idl", "mov"]) then { +if (_animType in ["idl", "mov", "adj"]) then { switch (_animName select [5, 3]) do { case ("knl"): { _duty = 1.5; From 60651fcb1e1f7493dd8364428c982d62f2ccbb81 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 14 Nov 2016 21:54:51 +0100 Subject: [PATCH 20/26] Tweaked prone animation duty --- addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf index 106ae0c16e..21eec5a88b 100644 --- a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +++ b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf @@ -28,7 +28,7 @@ if (_animType in ["idl", "mov", "adj"]) then { _duty = 1.5; }; case ("pne"): { - _duty = 12; + _duty = 10; }; default { _duty = 1; From b08270742d0629b86bef4b70e5b3d601af2cf636 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 14 Nov 2016 21:55:26 +0100 Subject: [PATCH 21/26] Tweaked fatigue in water --- .../advanced_fatigue/functions/fnc_getAnimDuty.sqf | 12 +++++++++--- .../advanced_fatigue/functions/fnc_handleEffects.sqf | 10 +++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf index 21eec5a88b..3698ff9113 100644 --- a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +++ b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf @@ -47,9 +47,15 @@ if (_animType in ["idl", "mov", "adj"]) then { }; } else { // swimming and diving - if (_animType in ["swm", "ssw", "bsw", "dve", "sdv", "bdv"]) then { - _duty = 5; - GVAR(isSwimming) = true; + switch (true) do { + case (_animType in ["swm", "ssw", "bsw"]): { + _duty = 6.5; + GVAR(isSwimming) = true; + }; + case (_animType in ["dve", "sdv", "bdv"]): { + _duty = 2.5; + GVAR(isSwimming) = true; + }; }; }; diff --git a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf index 1ecfb34a88..111727c826 100644 --- a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf @@ -58,7 +58,15 @@ if (GVAR(ppeBlackoutLast) == 1) then { // - Physical effects --------------------------------------------------------- if (GVAR(isSwimming)) exitWith { - _unit setAnimSpeedCoef (1 - _fatigue / 3); + _unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true]; + + if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then { + [_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + } else { + if ((!isSprintAllowed _unit) && {_fatigue < 0.7}) then { + [_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); + }; + }; }; if ((getAnimSpeedCoef _unit) != 1) then { _unit setAnimSpeedCoef 1; From 3fc8774d49662b7c750ceeeaed864435d0a0a6cb Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 16 Nov 2016 11:00:50 -0600 Subject: [PATCH 22/26] Change mortar to ammo handling weapon on init (#4678) Fix #4649 --- addons/mk6mortar/XEH_postInit.sqf | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/addons/mk6mortar/XEH_postInit.sqf b/addons/mk6mortar/XEH_postInit.sqf index aceb721d70..e3169b6dba 100644 --- a/addons/mk6mortar/XEH_postInit.sqf +++ b/addons/mk6mortar/XEH_postInit.sqf @@ -17,7 +17,25 @@ ["ace_initMortar", {_this call FUNC(mortarInit);}] call CBA_fnc_addEventHandler; -if (!hasInterface) exitWith {}; +if (hasInterface) then { + ["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; +}; -["vehicle", FUNC(handlePlayerVehicleChanged)] call CBA_fnc_addPlayerEventHandler; -["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; +["ace_settingsInitialized", { + TRACE_1("ace_settingsInitialized",GVAR(useAmmoHandling)); + + ["vehicle", FUNC(handlePlayerVehicleChanged), true] call CBA_fnc_addPlayerEventHandler; + + if (GVAR(useAmmoHandling)) then { + ["Mortar_01_base_F", "init", { + TRACE_2("mortar init",_this,(_this select 0) turretLocal [0]); + + //wait for proper turret locality change + [{ + TRACE_2("after delay",_this,(_this select 0) turretLocal [0]); + ["ace_initMortar", _this] call CBA_fnc_localEvent; + }, _this, 0.5] call CBA_fnc_waitAndExecute; + + }, true, [], true] call CBA_fnc_addClassEventHandler; + }; +}] call CBA_fnc_addEventHandler; From 0137009060ac4b27293c123827cb38fda2ab240a Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 16 Nov 2016 17:42:11 -0600 Subject: [PATCH 23/26] Add RHS MELB fastrope, add 3d debuging of mem points Close #4683 Config from @Whigital --- addons/fastroping/XEH_postInit.sqf | 21 +++++++++++++++++++++ addons/fastroping/script_component.hpp | 1 + optionals/compat_rhs_usf3/CfgVehicles.hpp | 9 +++++++++ optionals/compat_rhs_usf3/config.cpp | 2 +- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 2752e2dcde..1efb204247 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -16,3 +16,24 @@ false }; }, {false}] call CBA_fnc_addKeybind; + + + +#ifdef DRAW_FASTROPE_INFO +addMissionEventHandler ["Draw3D", { + if (!(cursorObject isKindOf "Helicopter")) exitWith {}; + private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _enabled = getNumber (_config >> QGVAR(enabled)); + drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; + if (_enabled > 0) then { + { + private _hookAttachment = cursorObject getVariable [QGVAR(FRIES), cursorObject]; + private _ropeOrigin = if (_x isEqualType []) then {_x} else {_hookAttachment selectionPosition _x}; + drawIcon3D ["", [1,.5,.5,1], (_hookAttachment modelToWorld _ropeOrigin), 0.5, 0.5, 0, format ["Rope: %1", _forEachIndex], 0.5, 0.025, "TahomaB"]; + } forEach (getArray (_config >> QGVAR(ropeOrigins))); + }; + if (_enabled == 2) then { + drawIcon3D ["", [.5,1,.5,1], (cursorObject modelToWorld getArray (_config >> QGVAR(friesAttachmentPoint))), 0.5, 0.5, 0, format ["Fries: %1", getText (_config >> QGVAR(friesType))], 0.5, 0.025, "TahomaB"]; + }; +}]; +#endif diff --git a/addons/fastroping/script_component.hpp b/addons/fastroping/script_component.hpp index 323d1c801c..19bdd1a109 100644 --- a/addons/fastroping/script_component.hpp +++ b/addons/fastroping/script_component.hpp @@ -2,6 +2,7 @@ #define COMPONENT_BEAUTIFIED Fastroping #include "\z\ace\addons\main\script_mod.hpp" +// #define DRAW_FASTROPE_INFO // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index b2460e5824..767557bece 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -196,6 +196,15 @@ class CfgVehicles { class Eventhandlers; }; class Heli_Transport_01_base_F: Helicopter_Base_H {}; + + class RHS_MELB_base: Helicopter_Base_H {}; + class RHS_MELB_MH6M: RHS_MELB_base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + EGVAR(fastroping,ropeOrigins)[] = {{1.166, 0.79, -0.01}, {-1.166, 0.79, -0.01}}; + }; + class RHS_UH60_Base: Heli_Transport_01_base_F { EGVAR(refuel,fuelCapacity) = 1360; }; diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index baae11bc4a..5847a2ac40 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_javelin", "ace_rearm", "ace_refuel", "ace_repair", "rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_HEMTT_A4", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"}; + requiredAddons[] = {"ace_javelin", "ace_rearm", "ace_refuel", "ace_repair", "rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_HEMTT_A4", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor", "rhsusf_c_melb"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut"}; url = ECSTRING(main,URL); From 28479c719050248e149425118f943cc3d21f3d42 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 16 Nov 2016 17:53:04 -0600 Subject: [PATCH 24/26] Remove unneeded functions --- optionals/compat_rhs_usf3/CfgVehicles.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index 767557bece..77091052ba 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -200,8 +200,6 @@ class CfgVehicles { class RHS_MELB_base: Helicopter_Base_H {}; class RHS_MELB_MH6M: RHS_MELB_base { EGVAR(fastroping,enabled) = 1; - EGVAR(fastroping,onCut) = QFUNC(onCut); - EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); EGVAR(fastroping,ropeOrigins)[] = {{1.166, 0.79, -0.01}, {-1.166, 0.79, -0.01}}; }; From 9d08ad8238aeff2fed3ecc320903c3d28848e415 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 22 Nov 2016 18:38:58 +0100 Subject: [PATCH 25/26] Prep 3.8.2 release --- addons/main/script_version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 2104cda997..35f889f47b 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 #define MINOR 8 #define PATCHLVL 2 -#define BUILD 12 +#define BUILD 13 From 2adb7c0d8b26b3d5ff6a53583e00937c908273fb Mon Sep 17 00:00:00 2001 From: Glowbal Date: Tue, 22 Nov 2016 22:54:09 +0100 Subject: [PATCH 26/26] Update versions for 3.8.2 - #4692 --- README.md | 2 +- docs/README_DE.md | 2 +- docs/README_PL.md | 2 +- docs/_config.yml | 10 +++++----- docs/_config_dev.yml | 10 +++++----- mod.cpp | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 7a170d1e15..c8682b339c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues diff --git a/docs/README_DE.md b/docs/README_DE.md index 90d5eb578e..bad1fc06c1 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Fehlermeldungen diff --git a/docs/README_PL.md b/docs/README_PL.md index a224f84277..edad01d3aa 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,7 +3,7 @@

- ACE3 Wersja + ACE3 Wersja ACE3 Zagadnienia diff --git a/docs/_config.yml b/docs/_config.yml index 9dd11e9a3b..37b5dd9f9f 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -10,16 +10,16 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 7 - patch: 0 - build: 6 + minor: 8 + patch: 2 + build: 13 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 - minor: 0 - patch: 0 + minor: 1 + patch: 1 build: 0 diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index 31d20e5439..1742300313 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -10,16 +10,16 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 7 - patch: 0 - build: 6 + minor: 8 + patch: 2 + build: 13 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 - minor: 0 - patch: 0 + minor: 1 + patch: 1 build: 0 diff --git a/mod.cpp b/mod.cpp index 45ec7fbbcf..3ff10b8aeb 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.8.1"; +name = "Advanced Combat Environment 3.8.2"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.8.1"; +description = "ACE3 - Version 3.8.2"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3";