From e5c4d3596999a5b1ca60969e528e049efc8bf496 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 29 Nov 2015 16:33:25 +0100 Subject: [PATCH 01/64] 1.55 use new selectRandom command --- addons/backpacks/functions/fnc_backpackOpened.sqf | 2 +- addons/interaction/CfgVehicles.hpp | 6 +++--- addons/medical/functions/fnc_createLitter.sqf | 2 +- addons/medical/functions/fnc_handleDamage.sqf | 2 +- addons/medical/functions/fnc_handleDamage_caching.sqf | 4 ++-- addons/medical/functions/fnc_handleDamage_woundsOld.sqf | 2 +- addons/medical/functions/fnc_playInjuredSound.sqf | 4 ++-- addons/scopes/functions/fnc_applyScopeAdjustment.sqf | 2 +- addons/sitting/functions/fnc_getRandomAnimation.sqf | 2 +- addons/spectator/functions/fnc_transitionCamera.sqf | 2 +- addons/zeus/functions/fnc_bi_moduleProjectile.sqf | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 4e61e8fbcc..c2f2721bc7 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -37,7 +37,7 @@ _sounds = [ _position = AGLToASL (_target modelToWorldVisual (_target selectionPosition "Spine3")); playSound3D [ - _sounds select floor random count _sounds, + selectRandom _sounds, objNull, false, _position, diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index dfe4f2025e..e9ad20c1b1 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -299,7 +299,7 @@ class CfgVehicles { class ACE_Gesture_Go { displayName = CSTRING(Gestures_Go); condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2);); + statement = QUOTE(_target playActionNow selectRandom [ARR_2('gestureGo','gestureGoB')];); showDisabled = 1; priority = 1.8; hotkey = "2"; @@ -354,7 +354,7 @@ class CfgVehicles { class ACE_Gesture_Yes { displayName = ECSTRING(common,Yes); condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2);); + statement = QUOTE(_target playActionNow selectRandom [ARR_2('gestureYes','gestureNod')];); showDisabled = 1; priority = 1.1; hotkey = "8"; @@ -370,7 +370,7 @@ class CfgVehicles { class ACE_Gesture_Hi { displayName = CSTRING(Gestures_Hi); condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3);); + statement = QUOTE(_target playActionNow selectRandom [ARR_3('gestureHi','gestureHiB','gestureHiC')];); showDisabled = 1; priority = 0.9; hotkey = "0"; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 54fd6694dd..29c62d1442 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -78,7 +78,7 @@ _createdLitter = []; // Loop through through the litter options and place the litter { if (typeName _x == "ARRAY" && {(count _x > 0)}) then { - [_target, _x select (floor(random(count _x)))] call _createLitter; + [_target, selectRandom _x] call _createLitter; }; if (typeName _x == "STRING") then { [_target, _x] call _createLitter; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 6d955e72fd..faf7d3273c 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -77,7 +77,7 @@ _minLethalDamage = if (_typeIndex >= 0) then { if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _shooter} && {_projectile == ""} && {_selection == ""}) then { if (GVAR(enableVehicleCrashes)) then { - _selection = GVAR(SELECTIONS) select (floor(random(count GVAR(SELECTIONS)))); + _selection = selectRandom GVAR(SELECTIONS); }; }; diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 910221a850..c97a1725a3 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -35,7 +35,7 @@ if (_selectionName in _hitSelections) then { // Check for vehicle crash if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _source} && {_projectile == ""} && {_selectionName == ""}) then { if (GVAR(enableVehicleCrashes)) then { - _selectionName = _hitSelections select (floor(random(count _hitSelections))); + _selectionName = selectRandom _hitSelections; _projectile = "vehiclecrash"; _this set [1, _selectionName]; _this set [4, _projectile]; @@ -57,7 +57,7 @@ if (_unit getVariable [QGVAR(isFalling), false]) then { }; } else { if (_selectionName == "") then { - _selectionName = ["leg_l", "leg_r"] select (floor(random 2)); + _selectionName = selectRandom ["leg_l", "leg_r"]; _this set [1, _selectionName]; }; _newDamage = _newDamage * 0.7; diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index dc21012dd6..016cb7982d 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -83,7 +83,7 @@ _woundsCreated = []; for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do { // Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage] - _toAddInjury = if (random(1) >= 0.85) then {_allInjuriesForDamageType select _highestPossibleSpot} else {_allPossibleInjuries select (floor(random (count _allPossibleInjuries)));}; + _toAddInjury = if (random(1) >= 0.85) then {_allInjuriesForDamageType select _highestPossibleSpot} else {selectRandom _allPossibleInjuries}; _toAddClassID = _toAddInjury select 0; _foundIndex = -1; diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 4792f879ec..3dcb7c270b 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -59,9 +59,9 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitwith { // Select the to be played sound based upon damage amount. if (_pain > 0.5) then { if (random(1) > 0.5) then { - _sound = _availableSounds_A select (round(random((count _availableSounds_A) - 1))); + _sound = selectRandom _availableSounds_A; } else { - _sound = _availableSounds_B select (round(random((count _availableSounds_B) - 1))); + _sound = selectRandom _availableSounds_B; }; } else { _sound = _availableSounds_B select (round(random((count _availableSounds_B) - 1))); diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index fbd3e1b636..15f0e8f981 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -36,7 +36,7 @@ _adjustmentDifference = (_adjustment select _weaponIndex) vectorDiff [_elevation _adjustment set [_weaponIndex, [_elevation, _windage, _zero]]; [_unit, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); -playSound (["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"] select floor random 3); +playSound selectRandom ["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"]; // slightly rotate the player if looking through optic if (cameraView == "GUNNER") then { diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf index ca9a9ccfb1..ce95819575 100644 --- a/addons/sitting/functions/fnc_getRandomAnimation.sqf +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -46,4 +46,4 @@ _animations = [ ]; // Select random animation -(_animations select (floor (random (count _animations)))) +selectRandom _animations diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index 0f6eb3ffc7..d5e28cc355 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -67,7 +67,7 @@ if (_newMode == 0) then { // Free // When null unit is given choose random if (isNull _newUnit) then { - _newUnit = GVAR(unitList) select floor(random(count GVAR(unitList))); + _newUnit = selectRandom GVAR(unitList); }; // Switch camera view to internal unit view (external uses the camera) diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 7150856154..e429c0b531 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -66,7 +66,7 @@ if (_activated) then { _velocity = [0,0,-100]; _radio = "SentGenIncoming"; _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]}; - _sound = _sounds call bis_fnc_selectrandom; + _sound = selectRandom _sounds; _hint = ["Curator","PlaceOrdnance"]; _shakeStrength = 0.01; _shakeRadius = 300; From caa55850440b1939e49715aafe7971f35e5ea4f2 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 29 Nov 2015 16:50:08 +0100 Subject: [PATCH 02/64] simplify getRandomAnimation in sitting --- addons/sitting/functions/fnc_getRandomAnimation.sqf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf index ce95819575..236977a1de 100644 --- a/addons/sitting/functions/fnc_getRandomAnimation.sqf +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -17,8 +17,8 @@ private "_animations"; -// Animations Pool -_animations = [ +// Select random animation from Animations Pool +selectRandom [ QGVAR(HubSittingChairA_idle1), QGVAR(HubSittingChairA_idle2), QGVAR(HubSittingChairA_idle3), @@ -43,7 +43,4 @@ _animations = [ QGVAR(HubSittingChairUC_idle2), QGVAR(HubSittingChairUC_idle3), QGVAR(HubSittingChairUC_move1) -]; - -// Select random animation -selectRandom _animations +] From ae1f35c042c85256623c03f33f16c64b5d24591a Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 29 Nov 2015 16:55:44 +0100 Subject: [PATCH 03/64] remove superfluous private --- addons/sitting/functions/fnc_getRandomAnimation.sqf | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf index 236977a1de..8dfe4b8cb3 100644 --- a/addons/sitting/functions/fnc_getRandomAnimation.sqf +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -15,8 +15,6 @@ */ #include "script_component.hpp" -private "_animations"; - // Select random animation from Animations Pool selectRandom [ QGVAR(HubSittingChairA_idle1), From 56e919dccc48e34d720a38e4ace0e662798dab2f Mon Sep 17 00:00:00 2001 From: gienkov Date: Sun, 6 Dec 2015 06:47:19 +0100 Subject: [PATCH 04/64] nozzle additonal check condition --- addons/refuel/functions/fnc_canConnectNozzle.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/refuel/functions/fnc_canConnectNozzle.sqf b/addons/refuel/functions/fnc_canConnectNozzle.sqf index 812234818e..f8503c821f 100644 --- a/addons/refuel/functions/fnc_canConnectNozzle.sqf +++ b/addons/refuel/functions/fnc_canConnectNozzle.sqf @@ -23,4 +23,4 @@ _nozzle = _unit getVariable [QGVAR(nozzle), objNull]; !(isNull _nozzle || {(_target distance _unit) > REFUEL_ACTION_DISTANCE} || - {!isNull (_target getVariable [QGVAR(nozzle), objNull])}) // TODO verify cant connect multiple fuel lines + {!isNull (_target getVariable [QGVAR(nozzle), objNull])} || isEngineOn _target) // TODO verify cant connect multiple fuel lines From a3e1e124f244479e5f49f1fffe299851b21dba03 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Mon, 14 Dec 2015 16:56:47 +0100 Subject: [PATCH 05/64] Update README_DE.md --- docs/README_DE.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index a51c562de8..4eda6546c7 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -1,21 +1,22 @@

+

- ACE3 Version + ACE3 Version - - ACE3 Download + + ACE3 Download - ACE3 Issues + ACE3        Fehlermeldungen BIF Thread - ACE3 License + ACE3 Lizenz ACE3 Slack @@ -24,7 +25,11 @@ ACE3 Build Status

-

Benötigt die aktuellste Version von CBA A3. Besucht uns auf Facebook | YouTube | Twitter | Reddit

+ +

+ Benötigt die aktuellste Version vonCBA A3.
+ Besucht uns auf Twitter | Facebook | YouTube | Reddit
+

**ACE3** ist ein Gemeinschaftsprojekt der sich zusammengeschlossenen Moddinggruppen von **ACE2**, **AGM** und **CSE** mit dem Ziel den Realismus und die Spieltiefe von Arma 3 zu steigern. From 999a6cd29d6b7ffcf8b404e85a0191b104dc4558 Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Mon, 14 Dec 2015 16:58:00 +0100 Subject: [PATCH 06/64] Update README_DE.md --- docs/README_DE.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 4eda6546c7..98e41d1ae0 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -10,7 +10,7 @@ ACE3 Download - ACE3        Fehlermeldungen + ACE3 Fehlermeldungen BIF Thread @@ -25,7 +25,6 @@ ACE3 Build Status

-

Benötigt die aktuellste Version vonCBA A3.
Besucht uns auf Twitter | Facebook | YouTube | Reddit
From 276aea04c14045474a5a3115925d700cd8f67832 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 24 Jan 2016 11:41:10 -0600 Subject: [PATCH 07/64] Changes for CBA 2.3 --- addons/dragging/CfgVehicles.hpp | 1 - addons/interact_menu/XEH_clientInit.sqf | 25 ------------------------- 2 files changed, 26 deletions(-) diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index bbd362f758..0a963df433 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -32,7 +32,6 @@ class CfgVehicles { // ammo boxes class ThingX; class ReammoBox_F: ThingX { - XEH_ENABLED; GVAR(canCarry) = 0; GVAR(carryPosition[]) = {0,1,1}; GVAR(carryDirection) = 0; diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index fe3b33feb5..017c2b05b8 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -76,28 +76,3 @@ GVAR(ParsedTextCached) = []; if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);}; if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;}; }] call EFUNC(common,addEventHandler); - -//Debug to help end users identify mods that break CBA's XEH -[{ - private _badClassnames = []; - { - //Only check Land objects (WeaponHolderSimulated show up in `vehicles` for some reason) - if ((_x isKindOf "Land") && {(isNil (format [QGVAR(Act_%1), typeOf _x])) || {isNil (format [QGVAR(SelfAct_%1), typeOf _x])}}) then { - if (!((typeOf _x) in _badClassnames)) then { - _badClassnames pushBack (typeOf _x); - ACE_LOGERROR_3("Compile checks bad for (classname: %1)(addon: %2) %3", (typeOf _x), (unitAddons (typeOf _x)), _x); - }; - }; - } forEach (allUnits + allDeadMen + vehicles); - if ((count _badClassnames) == 0) then { - ACE_LOGINFO("All compile checks passed"); - } else { - ACE_LOGERROR_1("%1 Classnames failed compile check!!! (bad XEH / missing cba_enable_auto_xeh.pbo)", (count _badClassnames)); - - //Only show visual error if they are actually missing the pbo: - #define SUPMON configFile>>"CfgSettings">>"CBA">>"XEH">>"supportMonitor" - if ((!isNumber(SUPMON)) || {getNumber(SUPMON) != 1}) then { - ["ACE Interaction failed to compile for some units (try adding cba_enable_auto_xeh.pbo)"] call BIS_fnc_error; - }; - }; -}, [], 5] call EFUNC(common,waitAndExecute); //ensure CBASupMon has time to run first From 7f6b17cdbc84ab5099e2a5cc16715f125d9b6423 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 5 Feb 2016 22:19:27 +0100 Subject: [PATCH 08/64] correct name for wheeled apc 01 cannon --- addons/realisticnames/CfgVehicles.hpp | 2 +- addons/realisticnames/CfgWeapons.hpp | 4 ++-- addons/realisticnames/stringtable.xml | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index 9aea632247..61864a8259 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -170,7 +170,7 @@ class CfgVehicles { // wheeled apcs class B_APC_Wheeled_01_base_F; class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { - displayName = CSTRING(APC_Wheeled_cannon_Name); + displayName = CSTRING(APC_Wheeled_01_cannon_Name); }; class O_APC_Wheeled_02_base_F; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 2adff28a41..645b6a8984 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -527,10 +527,10 @@ class CfgWeapons { }; // class ACE_LMG_coax_PKT_mem2: LMG_coax {}; class ACE_LMG_coax_MAG58_mem2: LMG_coax { - displayName = "MAG 58"; + displayName = "MAG 58M"; }; class ACE_LMG_coax_MAG58_mem3: LMG_coax { - displayName = "MAG 58"; + displayName = "MAG 58M"; }; class ACE_LMG_coax_L94A1_mem3: LMG_coax { displayName = "L94A1"; diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index b02d2a2822..b13a2a87cd 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -229,17 +229,17 @@ Bardelas Bardelas - - Patria AMV - Patria AMV - Patria AMV - Patria AMV - Patria AMV - Patria AMV - Patria AMV - Patria AMV - Patria AMV - Patria AMV + + Badger IFV + SpZ Badger + Badger IFV + Badger IFV + Badger IFV + Badger IFV + БМП Badger + Badger IFV + Badger IFV + Badger IFV Nemmera From ec4a4ef67f77b01ccebdbb2419c5884ce4aac049 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 5 Feb 2016 22:21:27 +0100 Subject: [PATCH 09/64] correct capitalization for German translation --- addons/realisticnames/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index b13a2a87cd..b9f6c85b93 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -231,7 +231,7 @@ Badger IFV - SpZ Badger + SPz Badger Badger IFV Badger IFV Badger IFV From 2ebd2f90467e3f2bc07d65e2d74160d43a326ec0 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 6 Feb 2016 11:42:35 +0100 Subject: [PATCH 10/64] replace filter and map with select and apply --- addons/common/functions/fnc_canInteractWith.sqf | 2 +- addons/common/functions/fnc_checkFiles.sqf | 6 +++--- addons/common/functions/fnc_filter.sqf | 7 ++++--- addons/common/functions/fnc_getChildren.sqf | 2 +- addons/common/functions/fnc_getVehicleUAVCrew.sqf | 2 +- addons/common/functions/fnc_map.sqf | 9 +++++---- addons/common/functions/fnc_removeSpecificMagazine.sqf | 6 +++--- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index 4b4382a14e..7603452965 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -16,7 +16,7 @@ params ["_unit", "_target", ["_exceptions", []]]; -_exceptions = [_exceptions, {toLower _this}] call FUNC(map); +_exceptions = _exceptions apply {toLower _x}; private _owner = _target getVariable [QGVAR(owner), objNull]; diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index cdf5cb3d93..19a4c6f72a 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -21,8 +21,8 @@ ACE_LOGINFO_1("ACE is version %1.",_version); //private _addons = activatedAddons; // broken with High-Command module, see #2134 private _addons = "true" configClasses (configFile >> "CfgPatches");// -_addons = [_addons, {toLower configName _this}] call FUNC(map);// -_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter); +_addons = _addons apply {toLower configName _x};// +_addons = _addons select {_x find "ace_" == 0}; { if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then { @@ -63,7 +63,7 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter); /////////////// if (isMultiplayer) then { // don't check optional addons - _addons = [_addons, {getNumber (configFile >> "CfgPatches" >> _this >> "ACE_isOptional") != 1}] call FUNC(filter); + _addons = _addons select {getNumber (configFile >> "CfgPatches" >> _x >> "ACE_isOptional") != 1}; if (isServer) then { // send servers version of ACE to all clients diff --git a/addons/common/functions/fnc_filter.sqf b/addons/common/functions/fnc_filter.sqf index 36ff328ef0..acee28eaa2 100644 --- a/addons/common/functions/fnc_filter.sqf +++ b/addons/common/functions/fnc_filter.sqf @@ -9,15 +9,16 @@ * Return Value: * Final array * - * Usage: - * [[0,1,2,3,4], {_this > 2}] call FUNC(filter) ==> [3,4] - * * Public: Yes + * + * Deprecated */ #include "script_component.hpp" params [["_array", [], [[]]], ["_code", {}, [{}]]]; +ACE_DEPRECATED("ace_common_fnc_filter","3.7.0","select CODE"); + private _result = []; { diff --git a/addons/common/functions/fnc_getChildren.sqf b/addons/common/functions/fnc_getChildren.sqf index 19fdf287fe..f2930b015d 100644 --- a/addons/common/functions/fnc_getChildren.sqf +++ b/addons/common/functions/fnc_getChildren.sqf @@ -16,4 +16,4 @@ params ["_name", "_cfgClass"]; private _classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass); -[_classes, {configName _this}] call FUNC(map) // return +_classes apply {configName _x} // return diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index fcb48ee216..2b2281ed10 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -14,4 +14,4 @@ params [["_vehicle", objNull, [objNull]]]; -[crew _vehicle, {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") == "UAVPilot"}] call FUNC(filter) // return +crew _vehicle select {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") == "UAVPilot"} // return diff --git a/addons/common/functions/fnc_map.sqf b/addons/common/functions/fnc_map.sqf index 5d24e13b38..ab9e61cba7 100644 --- a/addons/common/functions/fnc_map.sqf +++ b/addons/common/functions/fnc_map.sqf @@ -1,6 +1,6 @@ /* * Author: KoffeinFlummi, commy2 - * Applies given code to every element in an array, LIKE SOMETHING SQF SHOULD HAVE BY DEFAULT. + * Applies given code to every element in an array, LIKE SOMETHING SQF SHOULD HAVE BY DEFAULT. <- :kappa: * * Arguments: * 0: Array to be thingied. @@ -9,15 +9,16 @@ * Return Value: * Final array * - * Usage: - * [["2", "gobblecock", "25"], {parseNumber _this}] call FUNC(map) ==> [2, 0, 25] - * * Public: Yes + * + * Deprecated */ #include "script_component.hpp" params [["_array", [], [[]]], ["_code", {}, [{}]]]; +ACE_DEPRECATED("ace_common_fnc_filter","3.7.0","apply"); + // copy array to not alter the original one _array = + _array; diff --git a/addons/common/functions/fnc_removeSpecificMagazine.sqf b/addons/common/functions/fnc_removeSpecificMagazine.sqf index e703a56296..4ca5eec6d7 100644 --- a/addons/common/functions/fnc_removeSpecificMagazine.sqf +++ b/addons/common/functions/fnc_removeSpecificMagazine.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_magazineType", "", [""]], ["_ammoCount private _isRemoved = false; // Check uniform -private _magazines = [magazinesAmmoCargo uniformContainer _unit, {_this select 0 == _magazineType}] call FUNC(filter); +private _magazines = magazinesAmmoCargo uniformContainer _unit select {_x select 0 == _magazineType}; private _index = _magazines find [_magazineType, _ammoCount]; if (_index > -1) exitWith { @@ -39,7 +39,7 @@ if (_index > -1) exitWith { }; // Check vest -_magazines = [magazinesAmmoCargo vestContainer _unit, {_this select 0 == _magazineType}] call FUNC(filter); +_magazines = magazinesAmmoCargo vestContainer _unit select {_x select 0 == _magazineType}; _index = _magazines find [_magazineType, _ammoCount]; if (_index > -1) exitWith { @@ -59,7 +59,7 @@ if (_index > -1) exitWith { }; // Check backpack -_magazines = [magazinesAmmoCargo backpackContainer _unit, {_this select 0 == _magazineType}] call FUNC(filter); +_magazines = magazinesAmmoCargo backpackContainer _unit select {_x select 0 == _magazineType}; _index = _magazines find [_magazineType, _ammoCount]; if (_index > -1) exitWith { From 41e39c9c3a85b0e354a2157da759c6f8c20582f2 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 6 Feb 2016 11:58:31 +0100 Subject: [PATCH 11/64] replace more filter with select --- addons/common/functions/fnc_map.sqf | 2 +- addons/interaction/functions/fnc_passMagazine.sqf | 5 +---- addons/map/functions/fnc_blueForceTrackingUpdate.sqf | 10 +++++----- addons/map/functions/fnc_determineMapLight.sqf | 11 ++++++----- addons/reload/functions/fnc_canLinkBelt.sqf | 2 +- addons/reload/functions/fnc_startLinkingBelt.sqf | 2 +- .../functions/fnc_getLoadableMissiles.sqf | 2 +- addons/switchunits/functions/fnc_switchUnit.sqf | 2 +- .../weaponselect/functions/fnc_selectNextGrenade.sqf | 6 +++--- 9 files changed, 20 insertions(+), 22 deletions(-) diff --git a/addons/common/functions/fnc_map.sqf b/addons/common/functions/fnc_map.sqf index ab9e61cba7..c92a4eb588 100644 --- a/addons/common/functions/fnc_map.sqf +++ b/addons/common/functions/fnc_map.sqf @@ -17,7 +17,7 @@ params [["_array", [], [[]]], ["_code", {}, [{}]]]; -ACE_DEPRECATED("ace_common_fnc_filter","3.7.0","apply"); +ACE_DEPRECATED("ace_common_fnc_map","3.7.0","apply"); // copy array to not alter the original one _array = + _array; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 2afe2f3817..7e2f7b9356 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -21,10 +21,7 @@ params ["_player", "_target", "_weapon"]; private ["_compatibleMags", "_filteredMags", "_magToPass", "_magToPassIndex", "_playerName", "_magToPassDisplayName"]; _compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines"); -_filteredMags = [magazinesAmmoFull _player, { - params ["_className", "", "_loaded"]; - _className in _compatibleMags && !_loaded -}] call EFUNC(common,filter); +_filteredMags = magazinesAmmoFull _player select {(_x select 0) in _compatibleMags && {!(_x select 2)}}; //select magazine with most ammo _magToPass = _filteredMags select 0; diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index e9a619b5a4..bf2c413837 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -17,14 +17,14 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then { _playerSide = call EFUNC(common,playerSide); if !(GVAR(BFT_HideAiGroups)) then { - _groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter); + _groupsToDrawMarkers = allGroups select {side _x == _playerSide}; } else { - _groupsToDrawMarkers = [allGroups, { + _groupsToDrawMarkers = allGroups select { _anyPlayers = { [_x] call EFUNC(common,isPlayer); - } count units _this; - (side _this == _playerSide) && _anyPlayers > 0 - }] call EFUNC(common,filter); + } count units _x; + (side _x == _playerSide) && _anyPlayers > 0 + }; // @todo, simplify this }; { diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index 9712b84515..a844cdad07 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -95,11 +95,12 @@ TRACE_1("Player is on foot or in an open vehicle",""); // Using chemlights -_nearObjects = [_unit nearObjects ["SmokeShell", 4], { - alive _this && {(typeOf _this == "Chemlight_red") || { - (typeOf _this == "Chemlight_green") || { - (typeOf _this == "Chemlight_blue") || { - (typeOf _this == "Chemlight_yellow")}}}}}] call EFUNC(common,filter); +_nearObjects = (_unit nearObjects ["SmokeShell", 4]) select { + alive _x && {(typeOf _x == "Chemlight_red") || { + (typeOf _x == "Chemlight_green") || { + (typeOf _x == "Chemlight_blue") || { + (typeOf _x == "Chemlight_yellow")}}}}}; // @todo, simplify this + if (count (_nearObjects) > 0) then { _light = _nearObjects select 0; diff --git a/addons/reload/functions/fnc_canLinkBelt.sqf b/addons/reload/functions/fnc_canLinkBelt.sqf index b36959e4e1..13fad4d460 100644 --- a/addons/reload/functions/fnc_canLinkBelt.sqf +++ b/addons/reload/functions/fnc_canLinkBelt.sqf @@ -32,6 +32,6 @@ private _maxAmmo = 0; { _maxAmmo = _maxAmmo max (_x select 1); -} forEach ([magazinesAmmo _player, {_this select 0 == _magazineType}] call EFUNC(common,filter)); +} forEach (magazinesAmmo _player select {_x select 0 == _magazineType}); _maxAmmo > 0 diff --git a/addons/reload/functions/fnc_startLinkingBelt.sqf b/addons/reload/functions/fnc_startLinkingBelt.sqf index ebee6fd350..5924e1b4e1 100644 --- a/addons/reload/functions/fnc_startLinkingBelt.sqf +++ b/addons/reload/functions/fnc_startLinkingBelt.sqf @@ -32,7 +32,7 @@ private _maxAmmo = 0; { _maxAmmo = _maxAmmo max (_x select 1); -} forEach ([magazinesAmmo _player, {_this select 0 == _magazineType}] call EFUNC(common,filter)); +} forEach (magazinesAmmo _player select {_x select 0 == _magazineType}); if (_maxAmmo == 0) exitWith {}; diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf index 9b083a04c6..ed1f11bdf3 100644 --- a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf +++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf @@ -25,4 +25,4 @@ _magazines = magazines _unit; _magazines = [_magazines, {toLower _this}] call EFUNC(common,map); // get reloaders magazine types compatible with targets launcher. No duplicates. -[getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"), {toLower _this in _magazines}] call EFUNC(common,filter) +getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select {toLower _x in _magazines} // return diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 903207652c..a26b2d474a 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -25,7 +25,7 @@ private _leave = false; if (GVAR(EnableSafeZone)) then { private _allNearestPlayers = [position _unit, GVAR(SafeZoneRadius)] call FUNC(nearestPlayers); - private _nearestEnemyPlayers = [_allNearestPlayers, {((side GVAR(OriginalGroup)) getFriend (side _this) < 0.6) && !(_this getVariable [QGVAR(IsPlayerControlled), false])}] call EFUNC(common,filter); + private _nearestEnemyPlayers = _allNearestPlayers select {((side GVAR(OriginalGroup)) getFriend side _x < 0.6) && !(_x getVariable [QGVAR(IsPlayerControlled), false])}; if (count _nearestEnemyPlayers > 0) exitWith { _leave = true; diff --git a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf index a4e93814a9..f4b48a1b1e 100644 --- a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf +++ b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf @@ -57,9 +57,9 @@ private _nextGrenade = _grenades select _nextGrenadeIndex; if (_currentGrenade == _nextGrenade) exitWith {false}; // current best method to select a grenade: remove all grenades except the one you want to select, then add them back -private _uniformGrenades = [uniformItems _unit, {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}] call EFUNC(common,filter); -private _vestGrenades = [vestItems _unit, {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}] call EFUNC(common,filter); -private _backpackGrenades = [backpackItems _unit, {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}] call EFUNC(common,filter); +private _uniformGrenades = uniformItems _unit select {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}; +private _vestGrenades = vestItems _unit select {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}; +private _backpackGrenades = backpackItems _unit select {_x in GVAR(GrenadesAll) && {_x != _nextGrenade}}; // remove all grenades except those we are switching to --> this breaks the selector {_unit removeItemFromUniform _x; false} count _uniformGrenades; From ac007e6995bf60af8400d6539a590a766f48e68a Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 6 Feb 2016 12:08:04 +0100 Subject: [PATCH 12/64] replace more map with apply --- addons/inventory/XEH_postInit.sqf | 6 ++++-- addons/medical/functions/fnc_setHitPointDamage.sqf | 3 +-- addons/nametags/functions/fnc_doShow.sqf | 11 ++--------- .../functions/fnc_getLoadableMissiles.sqf | 2 +- addons/scopes/functions/fnc_applyScopeAdjustment.sqf | 2 +- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/addons/inventory/XEH_postInit.sqf b/addons/inventory/XEH_postInit.sqf index d0e3fb042a..7d7bfb23dd 100644 --- a/addons/inventory/XEH_postInit.sqf +++ b/addons/inventory/XEH_postInit.sqf @@ -18,7 +18,7 @@ GVAR(Grenades_ItemList) = []; } count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); // make list case insensitive -GVAR(Grenades_ItemList) = [GVAR(Grenades_ItemList), {toLower _this}] call EFUNC(common,map); +GVAR(Grenades_ItemList) = GVAR(Grenades_ItemList) apply {toLower _x}; // filter duplicates GVAR(Grenades_ItemList) = GVAR(Grenades_ItemList) arrayIntersect GVAR(Grenades_ItemList); @@ -42,7 +42,9 @@ GVAR(Medical_ItemList) = []; ); // make list case insensitive -GVAR(Medical_ItemList) = [GVAR(Medical_ItemList), {if (_this isEqualType "") then {toLower _this}}] call EFUNC(common,map); +GVAR(Medical_ItemList) = GVAR(Medical_ItemList) apply { + if (_x isEqualType "") then {toLower _x}; +}; // filter duplicates GVAR(Medical_ItemList) = GVAR(Medical_ItemList) arrayIntersect GVAR(Medical_ItemList); diff --git a/addons/medical/functions/fnc_setHitPointDamage.sqf b/addons/medical/functions/fnc_setHitPointDamage.sqf index f8698a7fe0..44da08f233 100644 --- a/addons/medical/functions/fnc_setHitPointDamage.sqf +++ b/addons/medical/functions/fnc_setHitPointDamage.sqf @@ -47,8 +47,7 @@ if !(_selection in _selections) exitWith { _unit setHitPointDamage [_selection, _damage]; }; -GVAR(unit) = _unit; -_damages = [_selections, {GVAR(unit) getHitPointDamage _this}] call EFUNC(common,map); +_damages = _selections apply {_unit getHitPointDamage _x}; _damageOld = damage _unit; _damageSumOld = 0; diff --git a/addons/nametags/functions/fnc_doShow.sqf b/addons/nametags/functions/fnc_doShow.sqf index 1b7323921f..615916de7f 100644 --- a/addons/nametags/functions/fnc_doShow.sqf +++ b/addons/nametags/functions/fnc_doShow.sqf @@ -18,23 +18,19 @@ private["_roleImages", "_player", "_vehicle", "_type", "_config", "_text", "_data", "_isAir", "_turretUnits", "_turretRoles", "_index", "_roleType", "_unit", "_toShow"]; - _player = ACE_player; _vehicle = vehicle _player; _type = typeOf _vehicle; _config = configFile >> "CfgVehicles" >> _type; _text = format[" %2
", getText(_config>>"picture"), getText (_config >> "DisplayName")]; - - _data = [_type] call FUNC(getVehicleData); _isAir = _data select 0; _data = _data select 1; -_turretUnits = [_data, { _vehicle turretUnit (_x select 0) } ] call EFUNC(common,map); -_turretRoles = [_data, { _x select 1 } ] call EFUNC(common,map); - +_turretUnits = _data apply {_vehicle turretUnit (_x select 0)}; +_turretRoles = _data apply {_x select 1}; _roleType = CARGO; _toShow = []; @@ -61,7 +57,6 @@ _toShow = []; _toShow pushBack [_x, _roleType]; } forEach crew _vehicle; - _toShow = [ _toShow, [], @@ -75,7 +70,6 @@ _toShow = [ } ] call BIS_fnc_sortBy; - _roleImages = ROLE_IMAGES; { _unit = _x select 0; @@ -83,7 +77,6 @@ _roleImages = ROLE_IMAGES; _text = _text + format["%1
", [_unit] call EFUNC(common,getName), _roleImages select _roleType]; } forEach _toShow; - ("ACE_CrewInfo_CrewInfo" call BIS_fnc_rscLayer) cutRsc ["ACE_CrewInfo_dialog", "PLAIN", 1, false]; terminate (missionNamespace getVariable [QGVAR(hideCrewInfoHandle), scriptNull]); diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf index ed1f11bdf3..e75d826513 100644 --- a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf +++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf @@ -22,7 +22,7 @@ private "_magazines"; _magazines = magazines _unit; // case sensitvity -_magazines = [_magazines, {toLower _this}] call EFUNC(common,map); +_magazines = _magazines apply {toLower _x}; // get reloaders magazine types compatible with targets launcher. No duplicates. getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select {toLower _x in _magazines} // return diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index 7fdb671859..f4040073a9 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -42,7 +42,7 @@ playSound (["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"] se // slightly rotate the player if looking through optic if (cameraView == "GUNNER") then { // Convert adjustmentDifference from mils to degrees - _adjustmentDifference = [_adjustmentDifference, {_this * 0.05625}] call EFUNC(common,map); + _adjustmentDifference = _adjustmentDifference apply {_x * 0.05625}; _adjustmentDifference params ["_elevationDifference", "_windageDifference"]; _pitchBankYaw = [_unit] call EFUNC(common,getPitchBankYaw); _pitchBankYaw params ["_pitch", "_bank", "_yaw"]; From 0a9048815bff611e703bc1103bcb59b22eb5f1fe Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 6 Feb 2016 14:59:31 +0100 Subject: [PATCH 13/64] simlify some select CODE statements --- addons/inventory/XEH_postInit.sqf | 7 ++++--- .../functions/fnc_blueForceTrackingUpdate.sqf | 17 ++++++++--------- addons/map/functions/fnc_determineMapLight.sqf | 18 ++++++------------ 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/addons/inventory/XEH_postInit.sqf b/addons/inventory/XEH_postInit.sqf index 7d7bfb23dd..586f10fc28 100644 --- a/addons/inventory/XEH_postInit.sqf +++ b/addons/inventory/XEH_postInit.sqf @@ -41,10 +41,11 @@ GVAR(Medical_ItemList) = []; ("true" configClasses (configFile >> QEGVAR(Medical,Actions) >> "Advanced")) ); +// remove all numbers from list +GVAR(Medical_ItemList) = GVAR(Medical_ItemList) select {_x isEqualType ""}; + // make list case insensitive -GVAR(Medical_ItemList) = GVAR(Medical_ItemList) apply { - if (_x isEqualType "") then {toLower _x}; -}; +GVAR(Medical_ItemList) = GVAR(Medical_ItemList) apply {toLower _x}; // filter duplicates GVAR(Medical_ItemList) = GVAR(Medical_ItemList) arrayIntersect GVAR(Medical_ItemList); diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index bf2c413837..3e966ca5f6 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -16,15 +16,14 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then { _groupsToDrawMarkers = []; _playerSide = call EFUNC(common,playerSide); - if !(GVAR(BFT_HideAiGroups)) then { - _groupsToDrawMarkers = allGroups select {side _x == _playerSide}; - } else { - _groupsToDrawMarkers = allGroups select { - _anyPlayers = { - [_x] call EFUNC(common,isPlayer); - } count units _x; - (side _x == _playerSide) && _anyPlayers > 0 - }; // @todo, simplify this + _groupsToDrawMarkers = allGroups select {side _x == _playerSide}; + + if (GVAR(BFT_HideAiGroups)) then { + _groupsToDrawMarkers = _groupsToDrawMarkers select { + { + _x call EFUNC(common,isPlayer); + } count units _x > 0; + }; }; { diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index a844cdad07..c647e93e0c 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -90,27 +90,21 @@ TRACE_1("Player is on foot or in an open vehicle",""); _lightLevel = _lightLevel max ([_unit, _x] call EFUNC(common,lightIntensityFromObject)); } forEach nearestObjects [_unit, ["All"], 40]; - // @todo: Illumination flares (timed) - // Using chemlights -_nearObjects = (_unit nearObjects ["SmokeShell", 4]) select { - alive _x && {(typeOf _x == "Chemlight_red") || { - (typeOf _x == "Chemlight_green") || { - (typeOf _x == "Chemlight_blue") || { - (typeOf _x == "Chemlight_yellow")}}}}}; // @todo, simplify this +_nearObjects = (_unit nearObjects ["SmokeShell", 4]) select {alive _x && {toLower typeOf _x in ["chemlight_red", "chemlight_green", "chemlight_blue", "chemlight_yellow"]}}; if (count (_nearObjects) > 0) then { _light = _nearObjects select 0; _ll = (1 - ((((_unit distance _light) - 2)/2) max 0)) * 0.4; if (_ll > _lightLevel) then { - _flareTint = switch (typeOf _light) do { - case "Chemlight_red" : {[1,0,0,1]}; - case "Chemlight_green" : {[0,1,0,1]}; - case "Chemlight_blue" : {[0,0,1,1]}; - case "Chemlight_yellow" : {[1,1,0,1]}; + _flareTint = switch (toLower typeOf _light) do { + case "chemlight_red" : {[1,0,0,1]}; + case "chemlight_green" : {[0,1,0,1]}; + case "chemlight_blue" : {[0,0,1,1]}; + case "chemlight_yellow" : {[1,1,0,1]}; }; _lightTint = [_lightTint, _flareTint, (_ll - _lightLevel)/(1 - _lightLevel)] call _fnc_blendColor; _lightLevel = _ll; From d326b1b6f150ee93048c84914af3bb77e5dccd92 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 6 Feb 2016 17:31:41 +0100 Subject: [PATCH 14/64] update cba files under tools --- addons/dragging/CfgVehicles.hpp | 1 - .../cba/addons/main/script_macros_common.hpp | 36 +- tools/cba/addons/xeh/init_pre.sqf | 366 ------------------ tools/cba/addons/xeh/script_xeh.hpp | 169 ++++---- 4 files changed, 94 insertions(+), 478 deletions(-) delete mode 100644 tools/cba/addons/xeh/init_pre.sqf diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index bbd362f758..0a963df433 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -32,7 +32,6 @@ class CfgVehicles { // ammo boxes class ThingX; class ReammoBox_F: ThingX { - XEH_ENABLED; GVAR(canCarry) = 0; GVAR(carryPosition[]) = {0,1,1}; GVAR(carryDirection) = 0; diff --git a/tools/cba/addons/main/script_macros_common.hpp b/tools/cba/addons/main/script_macros_common.hpp index d205bfc975..fa24f29432 100644 --- a/tools/cba/addons/main/script_macros_common.hpp +++ b/tools/cba/addons/main/script_macros_common.hpp @@ -621,9 +621,6 @@ Author: #define LSTR(var1) TRIPLES(ADDON,STR,var1) -#define CACHE_DIS_SYS(var1,var2) (isNumber(var1 >> "CfgSettings" >> "CBA" >> "caching" >> QUOTE(var2)) && getNumber(var1 >> "CfgSettings" >> "CBA" >> "caching" >> QUOTE(var2)) != 1) -#define CACHE_DIS(var1) (!isNil "CBA_RECOMPILE" || CACHE_DIS_SYS(configFile,var1) || CACHE_DIS_SYS(missionConfigFile,var1)) - #ifndef DEBUG_SETTINGS #define DEBUG_SETTINGS [false, true, false] #endif @@ -829,21 +826,21 @@ Parameters: Author: Spooner ------------------------------------------- */ -#define IS_META_SYS(VAR,TYPE) (if (isNil {VAR}) then { false } else { (typeName (VAR)) == TYPE }) -#define IS_ARRAY(VAR) IS_META_SYS(VAR,"ARRAY") -#define IS_BOOL(VAR) IS_META_SYS(VAR,"BOOL") -#define IS_CODE(VAR) IS_META_SYS(VAR,"CODE") -#define IS_CONFIG(VAR) IS_META_SYS(VAR,"CONFIG") -#define IS_CONTROL(VAR) IS_META_SYS(VAR,"CONTROL") -#define IS_DISPLAY(VAR) IS_META_SYS(VAR,"DISPLAY") -#define IS_GROUP(VAR) IS_META_SYS(VAR,"GROUP") -#define IS_OBJECT(VAR) IS_META_SYS(VAR,"OBJECT") -#define IS_SCALAR(VAR) IS_META_SYS(VAR,"SCALAR") -#define IS_SCRIPT(VAR) IS_META_SYS(VAR,"SCRIPT") -#define IS_SIDE(VAR) IS_META_SYS(VAR,"SIDE") +#define IS_META_SYS(VAR,TYPE) (if (isNil {VAR}) then { false } else { (VAR) isEqualType TYPE }) +#define IS_ARRAY(VAR) IS_META_SYS(VAR,[]) +#define IS_BOOL(VAR) IS_META_SYS(VAR,false) +#define IS_CODE(VAR) IS_META_SYS(VAR,{}) +#define IS_CONFIG(VAR) IS_META_SYS(VAR,configNull) +#define IS_CONTROL(VAR) IS_META_SYS(VAR,controlNull) +#define IS_DISPLAY(VAR) IS_META_SYS(VAR,displayNull) +#define IS_GROUP(VAR) IS_META_SYS(VAR,grpNull) +#define IS_OBJECT(VAR) IS_META_SYS(VAR,objNull) +#define IS_SCALAR(VAR) IS_META_SYS(VAR,0) +#define IS_SCRIPT(VAR) IS_META_SYS(VAR,scriptNull) +#define IS_SIDE(VAR) IS_META_SYS(VAR,west) #define IS_STRING(VAR) IS_META_SYS(VAR,"STRING") -#define IS_TEXT(VAR) IS_META_SYS(VAR,"TEXT") -#define IS_LOCATION(VAR) IS_META_SYS(VAR,"LOCATION") +#define IS_TEXT(VAR) IS_META_SYS(VAR,text "") +#define IS_LOCATION(VAR) IS_META_SYS(VAR,locationNull) #define IS_BOOLEAN(VAR) IS_BOOL(VAR) #define IS_FUNCTION(VAR) IS_CODE(VAR) @@ -1408,8 +1405,9 @@ Author: } // XEH Specific -#define XEH_DISABLED class EventHandlers {}; SLX_XEH_DISABLED = 1 -#define XEH_ENABLED class EventHandlers { EXTENDED_EVENTHANDLERS }; delete SLX_XEH_DISABLED +#define XEH_CLASS CBA_Extended_EventHandlers +#define XEH_DISABLED class EventHandlers { class XEH_CLASS {}; }; SLX_XEH_DISABLED = 1 +#define XEH_ENABLED class EventHandlers { class XEH_CLASS { EXTENDED_EVENTHANDLERS }; }; SLX_XEH_DISABLED = 0 // TODO: These are actually outdated; _Once ? #define XEH_PRE_INIT QUOTE(call COMPILE_FILE(XEH_PreInit_Once)) diff --git a/tools/cba/addons/xeh/init_pre.sqf b/tools/cba/addons/xeh/init_pre.sqf deleted file mode 100644 index 1b6642c777..0000000000 --- a/tools/cba/addons/xeh/init_pre.sqf +++ /dev/null @@ -1,366 +0,0 @@ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" -SCRIPT(init_pre); - -if !(isNil'SLX_XEH_MACHINE') exitWith {}; // Doublecheck.. - -LOG(MSG_INIT); -// No _this in pre/PostInit, also fixes call to init_compile -private "_this"; -_this = nil; - -private ["_id", "_cfgRespawn", "_respawn", "_level"]; - -// UNIQUE Session ID since start of game -_id = uiNamespace getVariable "SLX_XEH_ID"; -if (isNil "_id") then { _id = 1 } else { if (typeName _id != "SCALAR") then { _id = 0 }; if (_id < 0) then { _id = 0 }; INC(_id) }; -uiNamespace setVariable ["SLX_XEH_ID", _id]; - -CBA_isCached = uiNamespace getVariable "CBA_isCached"; -CBA_isCached = if (isNil "CBA_isCached" && {isMultiplayer} && {!isDedicated}) then { -1 } else { _id }; -uiNamespace setVariable ["CBA_isCached", CBA_isCached]; - -if (isNil "SLX_XEH_RECOMPILE") then { SLX_XEH_RECOMPILE = CACHE_DIS(xeh) }; - -if (!isMultiplayer || {isDedicated} || {CBA_isCached == -1}) then { - uiNamespace setVariable ["SLX_XEH_CACHE_KEYS", []]; - uiNamespace setVariable ["SLX_XEH_CACHE_KEYS2", []]; - uiNamespace setVariable ["SLX_XEH_CACHE_KEYS3", []]; - uiNamespace setVariable ["CBA_CACHE_KEYS", []]; -}; - -SLX_XEH_CACHE_KEYS = uiNamespace getVariable "SLX_XEH_CACHE_KEYS"; -SLX_XEH_CACHE_KEYS2 = uiNamespace getVariable "SLX_XEH_CACHE_KEYS2"; -SLX_XEH_CACHE_KEYS3 = uiNamespace getVariable "SLX_XEH_CACHE_KEYS3"; -CBA_CACHE_KEYS = uiNamespace getVariable "CBA_CACHE_KEYS"; - -// Always compile cache function once -call compile preProcessFileLineNumbers 'x\cba\addons\xeh\init_compile.sqf'; - -// Log -SLX_XEH_DisableLogging = isClass(configFile/"CfgPatches"/"Disable_XEH_Logging"); - -// Backup functions for macros -// TODO: Cleanup... -// CBA_fnc_log = { diag_log [diag_frameNo, diag_tickTime, time, _this] }; - - -/* CBA_fnc_defaultParam = { - params ["_params","_index","_defaultValue"]; - - private "_value"; - - if (!isNil "_defaultValue") then { - _value = _defaultValue; - }; - - if (!isNil "_params" && {(typeName _params) == "ARRAY"} && {count _params > _index} && {!isNil { _params select _index }}) then { - _value = _params select _index; - }; - - // Return. - if (isNil "_value") then { - nil; - } else { - _value; - }; -}; -*/ - -XEH_LOG("XEH: PreInit Started. v"+getText(configFile >> "CfgPatches" >> "CBA_XEH" >> "version")+". "+PFORMAT_5("MISSINIT",missionName,worldName,isMultiplayer,isServer,isDedicated)); -if (time > 0) then { XEH_LOG("XEH WARNING: Time > 0; This probably means there are no XEH compatible units by default on the map, perhaps add the SLX_XEH_Logic module.") }; - -// Compile all necessary scripts and start one vehicle crew initialisation thread -_cfgRespawn = (missionConfigFile/"respawn"); -_respawn = false; -if ( isNumber(_cfgRespawn) ) then { - _respawn = !(getNumber(_cfgRespawn) in [0, 1, 4, 5]); -}; -if ( isText(_cfgRespawn) ) then { - _respawn = !(getText(_cfgRespawn) in ["none", "bird", "group", "side"]); -}; - -SLX_XEH_objects = []; // Temporary array, to track InitPosts at mission initialization -SLX_XEH_INIT_MEN = []; // Temporary array, to track ManBased inits - to workaround JIP issue "Double init eh ran for crew units" -SLX_XEH_DELAYED = []; // Temporary array, to track Delayed Inits at mission initialization - - -// Game version detection -_level = 0; // pre v1.60 -// TODO: Improve v1.60 detection -// TODO: Temporary disabled due to #28652 -//if ((isNumber (configFile >> "CfgDifficulties" >> "recruit" >> "recoilCoef")) && (isNumber (configFile >> "CfgVehicles" >> "Car" >> "turnCoef"))) then { - //_level = 1; // v1.60 -//}; - -FUNC(determineProductVersion) = { - private "_pv"; - _pv = call {productVersion}; - - // A2 (and OA pre 1.61beta, and TOH pre 1.05?) does not support productVersion so we deal with it manually - if (isNil "_pv") then { - _pv = if (isClass(configFile >> "CfgPatches" >> "A3_Map_Stratis")) then { - // A3 Backup - ["Arma 3 Alpha","Arma3Alpha", -1, -1]; //,5,102571] - - } else { - if (isClass(configFile >> "CfgPatches" >> "United_States_H")) then { - // TOH Backup - ["TakeOn H", "TakeOnH", -1, -1]; - } else { - if (isClass(configFile >> "CfgPatches" >> "Takistan")) then { - // OA Backup - ["ArmA 2OA", "ArmA2OA", -1, -1]; - } else { - // A2 Backup - ["ArmA 2", "ArmA2", -1, -1]; - }; - }; - }; - }; - - _pv; -}; - -FUNC(determineGame) = { - // 0 = A2 - // 1 = OA - // 2 = TOH - // 3 = A3 :P - private "_pv"; - _pv = call FUNC(determineProductVersion); - - switch (_pv select 1) do { - case "ArmA2": {0}; - case "ArmA2OA": {1}; - case "TakeOnH": {2}; - case "Arma3Alpha": {3}; - case "Arma3": {3}; - default {0}; - }; -}; - -// System array with machine / mission / session information -SLX_XEH_MACHINE = -[ - !isDedicated, // 0 - isClient (and thus has player) - false, // 1 - isJip - !isServer, // 2 - isDedicatedClient (and thus not a Client-Server) - isServer, // 3 - isServer - isDedicated, // 4 - isDedicatedServer (and thus not a Client-Server) - false, // 5 - Player Check Finished - !isMultiplayer, // 6 - SP? - false, // 7 - StartInit Passed - false, // 8 - Postinit Passed - isMultiplayer && {_respawn}, // 9 - Multiplayer && respawn? - if (isDedicated) then { 0 } else { if (isServer) then { 1 } else { 2 } }, // 10 - Machine type (only 3 possible configurations) - _id, // 11 - SESSION_ID - _level, // 12 - LEVEL - Used for version determination - false, // 13 - TIMEOUT - PostInit timedOut - call FUNC(determineGame), // 14 - Game - call FUNC(determineProductVersion) // 15 - Product+Version -]; - -SLX_XEH_DUMMY = switch (SLX_XEH_MACHINE select 14) do { - case 2: {"Helipad_Invisible_H" }; - case 3: {"Land_HelipadEmpty_F" }; - default { "HeliHEmpty" }; -}; - -SLX_XEH_STR = ""; // Empty string -SLX_XEH_STR_INIT_EH = "Extended_Init_EventHandlers"; -SLX_XEH_STR_INIT_POST_EH = "Extended_InitPost_EventHandlers"; -SLX_XEH_STR_PreInit = "Extended_PreInit_EventHandlers"; -SLX_XEH_STR_PostInit = "Extended_PostInit_EventHandlers"; -SLX_XEH_STR_DEH = "DefaultEventhandlers"; -SLX_XEH_STR_TAG = "SLX_XEH_"; -SLX_XEH_STR_PLAYABLE = "SLX_XEH_PLAYABLE"; - -SLX_XEH_STR_PROCESSED = "SLX_XEH_PROCESSED"; -SLX_XEH_AR_FALSE = [SLX_XEH_STR_PROCESSED, false]; -SLX_XEH_AR_TRUE = [SLX_XEH_STR_PROCESSED, true]; - -SLX_XEH_OTHER_EVENTS = [XEH_EVENTS,XEH_CUSTOM_EVENTS]; // All events except the init event -SLX_XEH_OTHER_EVENTS_FULL = []; -{ SLX_XEH_OTHER_EVENTS_FULL pushBack format["Extended_%1_EventHandlers", _x] } forEach SLX_XEH_OTHER_EVENTS; -SLX_XEH_OTHER_EVENTS_XEH = []; -{ SLX_XEH_OTHER_EVENTS_XEH pushBack format["Extended_%1EH", _x] } forEach SLX_XEH_OTHER_EVENTS; -SLX_XEH_OTHER_EVENTS_XEH_PLAYERS = []; -{ SLX_XEH_OTHER_EVENTS_XEH_PLAYERS pushBack format["Extended_%1EH_Player", _x] } forEach SLX_XEH_OTHER_EVENTS; -SLX_XEH_OTHER_EVENTS_PLAYERS = []; - -// HitPart is special in that the passed parameter to the event handler is an array of arrays -{ - if (_x == "HitPart") then - { - SLX_XEH_OTHER_EVENTS_PLAYERS pushBack (compile format["{ { _this call _x } forEach (((_this select 0) select 0) getVariable [SLX_XEH_STR_%1_Player,[]]) }",_x]) - } - else - { - SLX_XEH_OTHER_EVENTS_PLAYERS pushBack (compile format["{ { _this call _x } forEach ((_this select 0) getVariable [SLX_XEH_STR_%1_Player,[]]) }",_x]) - } -} forEach SLX_XEH_OTHER_EVENTS; - -SLX_XEH_CONFIG_FILES = [configFile, campaignConfigFile, missionConfigFile]; -SLX_XEH_CONFIG_FILES_VARIABLE = [campaignConfigFile, missionConfigFile]; - -SLX_XEH_DEF_CLASSES = [SLX_XEH_STR, "All"]; - -// XEH for non XEH supported addons -// Only works until someone uses removeAllEventhandlers on the object -// Only works if there is at least 1 XEH-enabled object on the Map - Place SLX_XEH_Logic to make sure XEH initializes. -// TODO: Perhaps do a config verification - if no custom eventhandlers detected in _all_ CfgVehicles classes, don't run this XEH handler - might be too much processing. -SLX_XEH_EVENTS_NAT = [XEH_EVENTS]; -SLX_XEH_EVENTS_FULL_NAT = []; -{ SLX_XEH_EVENTS_FULL_NAT pushBack format["Extended_%1_EventHandlers", _x] } forEach SLX_XEH_EVENTS_NAT; - -SLX_XEH_EXCLUDES = []; // TODO: Anything else?? - Ammo crates for instance have no XEH by default due to crashes) - however, they don't appear in 'vehicles' list anyway. -SLX_XEH_CLASSES = []; // Used to cache classes that have full XEH setup - TODO: Performance test.. Could use object with a variable space, classname as key -SLX_XEH_FULL_CLASSES = []; // Used to cache classes that NEED full XEH setup -SLX_XEH_EXCL_CLASSES = []; // Used for exclusion classes - - -// Function Compilation -SLX_XEH_LOG = { XEH_LOG(_this); }; - -PREP(init_once); // Pre and PostInits - -PREP(init_delayed); -PREP(init_playable); - -// Inits and InitPosts -PREP(init); -PREP(init_enum); -PREP(init_enum_cache); -PREP(init_post); - -// Init Others -PREP(init_others); -PREP(init_others_enum); -PREP(init_others_enum_cache); - -PREP(addPlayerEvents); // Add / Remove the playerEvents -PREP(removePlayerEvents); -PREP(support_monitor); -PREP(support_monitor2); - -call COMPILE_FILE(init_eh); // All XEH Event functions - - -/* -* Process the crews of vehicles. This "thread" will run just -* before PostInit and the mission init.sqf is processed. The order of execution is -* -* 1) all config.cpp init EHs (including all Extended_Init_Eventhandlers) -* 2) all the init lines in the mission.sqm -* 3) spawn:ed "threads" are started -* 4) the mission's init.sqf/sqs is run -*/ - -GVAR(init_obj) = SLX_XEH_DUMMY createVehicleLocal [0, 0, 0]; -GVAR(init_obj) addEventHandler ["killed", { - #ifdef DEBUG_MODE_FULL - XEH_LOG("XEH: VehicleCrewInit: "+str(count vehicles)); - #endif - - { - _sim = getText(configFile/"CfgVehicles"/(typeOf _x)/"simulation"); - _crew = crew _x; - /* - * If it's a vehicle then start event handlers for the crew. - * (Vehicles have crew and are neither humanoids nor game logics) - */ - if (count _crew > 0 && {{ _sim == _x }count["soldier", "invisible"] == 0}) then { - { if !(_x in SLX_XEH_INIT_MEN) then { [_x] call SLX_XEH_EH_Init } } forEach _crew; - }; - } forEach vehicles; - SLX_XEH_INIT_MEN = nil; - - deleteVehicle GVAR(init_obj);GVAR(init_obj) = nil -}]; - -GVAR(init_obj) setDamage 1; // Schedule to run itsy bitsy later - -// Prepare postInit -GVAR(init_obj2) = SLX_XEH_DUMMY createVehicleLocal [0, 0, 0]; -GVAR(init_obj2) addEventHandler ["killed", { - call COMPILE_FILE(init_post); - deleteVehicle GVAR(init_obj2);GVAR(init_obj2) = nil; -}]; - -// Schedule PostInit -SLX_XEH_STR spawn { - // Warn if PostInit takes longer than 10 tickTime seconds - SLX_XEH_STR spawn { - private["_time2Wait"]; - _time2Wait = diag_ticktime + 10; - waituntil {diag_ticktime > _time2Wait}; - if !(SLX_XEH_MACHINE select 8) then { - XEH_LOG("WARNING: PostInit did not finish in a timely fashion"); - waitUntil {time > 0}; - // Consider there will be no player if neither PostInit-Ready, nor PlayerCheck-Ready - if !(SLX_XEH_MACHINE select 8 || {SLX_XEH_MACHINE select 5}) then { SLX_XEH_MACHINE set [13, true]; }; - }; - }; - - // On Server + Non JIP Client, we are now after all objects have inited - // and at the briefing, still time == 0 - if (isNull player) then { - #ifdef DEBUG_MODE_FULL - "NULL PLAYER" call SLX_XEH_LOG; - #endif - if !((SLX_XEH_MACHINE select 4) || {(SLX_XEH_MACHINE select 6)}) then { // only if MultiPlayer and not dedicated - #ifdef DEBUG_MODE_FULL - "JIP" call SLX_XEH_LOG; - #endif - - // TEST for weird jip-is-server-issue :S - if (!(SLX_XEH_MACHINE select 2) || {SLX_XEH_MACHINE select 3} || {SLX_XEH_MACHINE select 4}) then { - str(["WARNING: JIP Client, yet wrong detection", SLX_XEH_MACHINE]) call SLX_XEH_LOG; - SLX_XEH_MACHINE set [2, true]; // set Dedicated client - SLX_XEH_MACHINE set [3, false]; // set server - SLX_XEH_MACHINE set [4, false]; // set dedicatedserver - }; - waitUntil { !(isNull player) || {SLX_XEH_MACHINE select 13} }; - if (SLX_XEH_MACHINE select 13) then { XEH_LOG("WARNING: TimedOut waiting for player object to be ready. Continueing PostInit without Player ready") }; - }; - }; - - if !(isNull player) then { - if (isNull (group player) && {player isKindOf "CAManBase"}) then { - // DEBUG TEST: Crashing due to JIP, or when going from briefing - // into game - #ifdef DEBUG_MODE_FULL - "NULLGROUP" call SLX_XEH_LOG; - #endif - waitUntil { !(isNull (group player)) }; - }; - waitUntil { local player }; - }; - - // set JIP - SLX_XEH_MACHINE set [1, !isDedicated && getClientState in ["BRIEFING SHOWN","BRIEFING READ","GAME FINISHED","DEBRIEFING READ"]]; - - GVAR(init_obj2) setDamage 1; // Schedule to run itsy bitsy later - - SLX_XEH_MACHINE set [5, true]; // set player check = complete -}; - -// Load and call any "pre-init", run-once event handlers -/* - Compile code strings in the Extended_PreInit_EventHandlers class and call - them. This is done once per mission and before any extended init event - handler code is run. An addon maker can put run-once initialisation code - in such a pre-init "EH" rather than in a normal XEH init EH which might be - called several times. -*/ -{ (_x/SLX_XEH_STR_PreInit) call FUNC(init_once) } forEach SLX_XEH_CONFIG_FILES; - -private "_s"; -// Normally, full caching is enabled. If not, log an informative message. -_s = if (SLX_XEH_RECOMPILE || CBA_COMPILE_RECOMPILE || CBA_FUNC_RECOMPILE) then { - PFORMAT_3(" CACHE DISABLED? (Disable caching with cba_cache_disable.pbo)",SLX_XEH_RECOMPILE,CBA_COMPILE_RECOMPILE,CBA_FUNC_RECOMPILE) -} else { - "" -}; -XEH_LOG("XEH: PreInit Finished." + _s); diff --git a/tools/cba/addons/xeh/script_xeh.hpp b/tools/cba/addons/xeh/script_xeh.hpp index 4f242b492e..82fb724c03 100644 --- a/tools/cba/addons/xeh/script_xeh.hpp +++ b/tools/cba/addons/xeh/script_xeh.hpp @@ -8,103 +8,88 @@ // MACRO: EXTENDED_EVENTHANDLERS // Add all XEH event handlers ///////////////////////////////////////////////////////////////////////////////// -#define EXTENDED_EVENTHANDLERS init = "_this call SLX_XEH_EH_Init"; \ -fired = "_this call SLX_XEH_EH_Fired"; \ -animChanged = "_this call SLX_XEH_EH_AnimChanged"; \ -animDone = "_this call SLX_XEH_EH_AnimDone"; \ -animStateChanged = "_this call SLX_XEH_EH_AnimStateChanged"; \ -containerClosed = "_this call SLX_XEH_EH_ContainerClosed"; \ -containerOpened = "_this call SLX_XEH_EH_ContainerOpened"; \ -controlsShifted = "_this call SLX_XEH_EH_ControlsShifted"; \ -dammaged = "_this call SLX_XEH_EH_Dammaged"; \ -engine = "_this call SLX_XEH_EH_Engine"; \ -epeContact = "_this call SLX_XEH_EH_EpeContact"; \ -epeContactEnd = "_this call SLX_XEH_EH_EpeContactEnd"; \ -epeContactStart = "_this call SLX_XEH_EH_EpeContactStart"; \ -explosion = "_this call SLX_XEH_EH_Explosion"; \ -firedNear = "_this call SLX_XEH_EH_FiredNear"; \ -fuel = "_this call SLX_XEH_EH_Fuel"; \ -gear = "_this call SLX_XEH_EH_Gear"; \ -getIn = "_this call SLX_XEH_EH_GetIn"; \ -getOut = "_this call SLX_XEH_EH_GetOut"; \ -handleHeal = "_this call SLX_XEH_EH_HandleHeal"; \ -hit = "_this call SLX_XEH_EH_Hit"; \ -hitPart = "_this call SLX_XEH_EH_HitPart"; \ -incomingMissile = "_this call SLX_XEH_EH_IncomingMissile"; \ -inventoryClosed = "_this call SLX_XEH_EH_InventoryClosed"; \ -inventoryOpened = "_this call SLX_XEH_EH_InventoryOpened"; \ -killed = "_this call SLX_XEH_EH_Killed"; \ -landedTouchDown = "_this call SLX_XEH_EH_LandedTouchDown"; \ -landedStopped = "_this call SLX_XEH_EH_LandedStopped"; \ -local = "_this call SLX_XEH_EH_Local"; \ -respawn = "_this call SLX_XEH_EH_Respawn"; \ -put = "_this call SLX_XEH_EH_Put"; \ -take = "_this call SLX_XEH_EH_Take"; \ -seatSwitched = "_this call SLX_XEH_EH_SeatSwitched"; \ -soundPlayed = "_this call SLX_XEH_EH_SoundPlayed"; \ -weaponAssembled = "_this call SLX_XEH_EH_WeaponAssembled"; \ -weaponDisAssembled = "_this call SLX_XEH_EH_WeaponDisassembled"; - -//handleDamage = "_this call SLX_XEH_EH_HandleDamage"; \ -//mpHit = "_this call SLX_XEH_EH_MPHit"; \ -//mpKilled = "_this call SLX_XEH_EH_MPKilled"; \ -//mpRespawn = "_this call SLX_XEH_EH_MPRespawn"; +#define EXTENDED_EVENTHANDLERS init = "(_this select 0) call CBA_fnc_initEvents; (_this select 0) call CBA_fnc_init"; \ +fired = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_fired"")"; \ +animChanged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animChanged"")"; \ +animDone = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animDone"")"; \ +animStateChanged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animStateChanged"")"; \ +containerClosed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_containerClosed"")"; \ +containerOpened = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_containerOpened"")"; \ +controlsShifted = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_controlsShifted"")"; \ +dammaged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_dammaged"")"; \ +engine = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_engine"")"; \ +epeContact = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContact"")"; \ +epeContactEnd = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContactEnd"")"; \ +epeContactStart = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContactStart"")"; \ +explosion = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_explosion"")"; \ +firedNear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_firedNear"")"; \ +fuel = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_cba_xeh_fuel"")"; \ +gear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_gear"")"; \ +getIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getIn"")"; \ +getOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOut"")"; \ +handleHeal = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_handleHeal"")"; \ +hit = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_hit"")"; \ +hitPart = "{_this call _x} forEach ((_this select 0 select 0) getVariable ""cba_xeh_hitPart"")"; \ +incomingMissile = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_incomingMissile"")"; \ +inventoryClosed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_inventoryClosed"")"; \ +inventoryOpened = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_inventoryOpened"")"; \ +killed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_killed"")"; \ +landedTouchDown = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_landedTouchDown"")"; \ +landedStopped = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_landedStopped"")"; \ +local = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_local"")"; \ +respawn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_respawn"")"; \ +put = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_put"")"; \ +take = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_take"")"; \ +seatSwitched = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitched"")"; \ +soundPlayed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_soundPlayed"")"; \ +weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponAssembled"")"; \ +weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \ +weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \ +weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; /* MACRO: DELETE_EVENTHANDLERS - Removes all event handlers. - - Example: - (begin example) - class DefaultEventhandlers; - class Car_F; - class MRAP_01_base_F: Car_F { - class EventHandlers; - }; - class B_MRAP_01_F: MRAP_01_base_F { - class Eventhandlers: EventHandlers { - DELETE_EVENTHANDLERS - }; - }; - (end example) + Removes all event handlers. */ -#define DELETE_EVENTHANDLERS delete init; \ -delete fired; \ -delete animChanged; \ -delete animDone; \ -delete animStateChanged; \ -delete containerClosed; \ -delete containerOpened; \ -delete controlsShifted; \ -delete dammaged; \ -delete engine; \ -delete epeContact; \ -delete epeContactEnd; \ -delete epeContactStart; \ -delete explosion; \ -delete firedNear; \ -delete fuel; \ -delete gear; \ -delete getIn; \ -delete getOut; \ -delete handleHeal; \ -delete hit; \ -delete hitPart; \ -delete incomingMissile; \ -delete inventoryClosed; \ -delete inventoryOpened; \ -delete killed; \ -delete landedTouchDown; \ -delete landedStopped; \ -delete local; \ -delete respawn; \ -delete put; \ -delete take; \ -delete seatSwitched; \ -delete soundPlayed; \ -delete weaponAssembled; \ -delete weaponDisAssembled; +#define DELETE_EVENTHANDLERS init = ""; \ +fired = ""; \ +animChanged = ""; \ +animDone = ""; \ +animStateChanged = ""; \ +containerClosed = ""; \ +containerOpened = ""; \ +controlsShifted = ""; \ +dammaged = ""; \ +engine = ""; \ +epeContact = ""; \ +epeContactEnd = ""; \ +epeContactStart = ""; \ +explosion = ""; \ +firedNear = ""; \ +fuel = ""; \ +gear = ""; \ +getIn = ""; \ +getOut = ""; \ +handleHeal = ""; \ +hit = ""; \ +hitPart = ""; \ +incomingMissile = ""; \ +inventoryClosed = ""; \ +inventoryOpened = ""; \ +killed = ""; \ +landedTouchDown = ""; \ +landedStopped = ""; \ +local = ""; \ +respawn = ""; \ +put = ""; \ +take = ""; \ +seatSwitched = ""; \ +soundPlayed = ""; \ +weaponAssembled = ""; \ +weaponDisassembled = ""; \ +weaponDeployed = ""; \ +weaponRested = ""; From baf979064ae7758bebc61c90b4c39f4efc003c57 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 6 Feb 2016 17:45:47 +0100 Subject: [PATCH 15/64] remove old ragdoll tweaks --- addons/ragdolls/$PBOPREFIX$ | 1 - addons/ragdolls/README.md | 12 - addons/ragdolls/config.cpp | 801 --------------------------- addons/ragdolls/script_component.hpp | 17 - 4 files changed, 831 deletions(-) delete mode 100644 addons/ragdolls/$PBOPREFIX$ delete mode 100644 addons/ragdolls/README.md delete mode 100644 addons/ragdolls/config.cpp delete mode 100644 addons/ragdolls/script_component.hpp diff --git a/addons/ragdolls/$PBOPREFIX$ b/addons/ragdolls/$PBOPREFIX$ deleted file mode 100644 index 4c2fcd3ef9..0000000000 --- a/addons/ragdolls/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\ragdolls \ No newline at end of file diff --git a/addons/ragdolls/README.md b/addons/ragdolls/README.md deleted file mode 100644 index 86739775c3..0000000000 --- a/addons/ragdolls/README.md +++ /dev/null @@ -1,12 +0,0 @@ -ace_ragdolls -============ - -Tweaks the ragdoll behaviour to be more responsive to bullet impacts and explosions. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/ragdolls/config.cpp b/addons/ragdolls/config.cpp deleted file mode 100644 index 3d9198a41d..0000000000 --- a/addons/ragdolls/config.cpp +++ /dev/null @@ -1,801 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi", "Opticalsnare"}; - authorUrl = "https://github.com/KoffeinFlummi/"; - VERSION_CONFIG; - }; -}; - -/* - * BASED ON OPTICALSNARE'S WORK - * He gave permission to use his code here: - * http://forums.bistudio.com/showthread.php?171771-Flying-bodies-Physics-Mod&p=2603042#post2603042 - */ - -class PhysXParams { - epeImpulseDamageCoef = 1320.0; - impulseForceRagdollCoef = 200; - impulseTorqueRagdollCoef = 100; - maxRagdollImpulseForceMagnitude = 500; - maxRagdollImpulseTorqueMagnitude = 150; - ragdollHitDmgLimit = "0.01f"; - ragdollHitForceCoef = "20f"; - ragdollHitTime = "0.05f"; - ragdollOnCollideForceCoef = "20.0f"; - ragdollOnCollideMassLimit = "0.0f"; - ragdollOnCollideMaxForce = "25.0f"; - ragdollOnCollideMaxOffset = "2.0f"; - ragdollOnCollideMaxOffsetSpeed = "50.0f"; - ragdollOnCollideSpeedLimit = "2500.0f"; - ragdollOnCollideVehicleImpulseCoef = "0.5f"; - ragdollUnconsciousSleepCoef = "0f"; - ragdollUnderwaterBuoyancyCoef = 9.7; - ragdollUnderwaterResistanceCoef = 0.005; - ragdollVehicleCollision = 1; -}; - -class RagDollDefaultLimit { - value = 0; - restitution = 0.9; - hardness = 0.5; -}; - -class RagDollDefaultSpring { - enabled = 0; - value = 0.5; - damper = 1; - targetValue = 0; -}; - -class RagDollSphericalJoint { - class TwistLimitLow : RagDollDefaultLimit {}; - - class TwistLimitHigh : RagDollDefaultLimit {}; - - class SwingLimit : RagDollDefaultLimit {}; - - class TwistSpring : RagDollDefaultSpring { - enabled = 1; - }; - - class SwingSpring : RagDollDefaultSpring { - enabled = 1; - damper = 2; - }; - - class JointSpring : RagDollDefaultSpring { - enabled = 0; - }; - type = "spherical"; - enableCollision = 0; - projectionDistance = 0.05; - projectionMode = "point"; -}; - -class RagDollRevoluteJoint { - class LimitLow : RagDollDefaultLimit {}; - - class LimitHigh : RagDollDefaultLimit {}; - - class Spring : RagDollDefaultSpring { - enabled = 0; - }; - type = "revolute"; - enableCollision = 0; - projectionDistance = 0.05; - projectionMode = "point"; -}; - -class RagDollD6Joint_PX3 { - type = "D6"; - enableCollision = 0; - projectionDistance = 0.05; - projectionMode = "point"; - swingLimitY = "0.0f"; - swingLimitZ = "0.0f"; - swingSpring = "0.0f"; - swingDamping = "0.0f"; - swingRestitution = "0.6f"; - swingContactDistance = "0.05f"; - twistLimitLower = "0.0f"; - twistLimitUpper = "0.0f"; - twistSpring = "0.0f"; - twistDamping = "0.0f"; - twistRestitution = "0.6f"; - twistContactDistance = "0.05f"; - driveSpring = "20.0f"; - driveDamping = "20.0f"; - driveMaxForce = "1000000.0f"; - driveUseAcceleration = 1; - driveLinearVelocity[] = {0, 0, 0}; - driveAngularVelocity[] = {0, 0, 0}; -}; - -class CfgRagDollSkeletons { - class BaseRagdoll { - primaryWeaponBone = ""; - secondaryWeaponBone = ""; - networkBonePrimary = ""; - networkBoneSecondary = ""; - weaponSleepLinearVelocity = 20; - weaponSleepAngularVelocity = 20; - weaponDropMinTime = 1.0; - weaponDropMaxTime = 100.0; - weaponDistanceLimit = "10f"; - weaponDistanceLimitTime = "5.0f"; - sleepLinearVelocity = 0.05; - sleepAngularVelocity = 0.05; - simulateMinTime = 30; - simulateMaxTime = 100.0; - simulateDistanceLimit = "0.05f"; - simulateDistanceLimitTime = "5.0f"; - recoveryBlendTime = "0.5f"; - recoveryCosLimit = "0.3f"; - recoveryDistLimit = "0.7f"; - animBlendTime = "0.0f"; - }; - - class Soldier : BaseRagdoll { - primaryWeaponBone = "weapon"; - secondaryWeaponBone = "launcher"; - networkBonePrimary = "chest"; - networkBoneSecondary = "pelvis"; - draggingMask = "dragging"; - hitMask = "hit"; - hitMaskUnderwater = "hitUnderwater"; - - class WeaponLinkBones { - class LinkBone1 { - bone = "leftHand"; - canBeDropped = 1; - prefference = "1.0f"; - }; - - class LinkBone2 { - bone = "rightHand"; - canBeDropped = 1; - prefference = "2.0f"; - }; - - class LinkBone3 { - bone = "chest"; - canBeDropped = 1; - prefference = "1.0f"; - }; - }; - - class Masks { - class DraggingMask { - name = "dragging"; - mask[] = {{"pelvis", 0, 1}, {"chest", 0, 1}, {"head", "0.6f", 0}, {"leftArm", 1, 0}, {"leftForeArm", 1, 0}, {"leftHand", 1, 0}, {"rightArm", 1, 0}, {"rightForeArm", 1, 0}, {"rightHand", 1, 0}, {"leftUpLeg", 1, 0}, {"leftLeg", 1, 0}, {"leftFoot", 1, 0}, {"rightUpLeg", 1, 0}, {"rightLeg", 1, 0}, {"rightFoot", 1, 0}, {"weapon", 0, 1}, {"launcher", 0, 1}}; - }; - - class HitMask { - name = "hit"; - mask[] = {{"pelvis", 1, 0}, {"chest", 1, 0}, {"head", 1, 0}, {"leftArm", 1, 0}, {"leftForeArm", 1, 0}, {"leftHand", 1, 0}, {"rightArm", 1, 0}, {"rightForeArm", 1, 0}, {"rightHand", 1, 0}, {"leftUpLeg", 1, 0}, {"leftLeg", 1, 0}, {"leftFoot", 1, 1}, {"rightUpLeg", 1, 0}, {"rightLeg", 1, 0}, {"rightFoot", 1, 1}, {"weapon", 1, 0}, {"launcher", 1, 0}}; - }; - - class HitMaskUnderwater { - name = "hitUnderwater"; - mask[] = {{"pelvis", 1, 1}, {"chest", 1, 1}, {"head", 1, 0}, {"leftArm", 1, 0}, {"leftForeArm", 1, 0}, {"leftHand", 1, 0}, {"rightArm", 1, 0}, {"rightForeArm", 1, 0}, {"rightHand", 1, 0}, {"leftUpLeg", 1, 0}, {"leftLeg", 1, 0}, {"leftFoot", 1, 0}, {"rightUpLeg", 1, 0}, {"rightLeg", 1, 0}, {"rightFoot", 1, 0}, {"weapon", 1, 0}, {"launcher", 1, 0}}; - }; - }; - - class BaseRagdollBone { - material = "Ragdoll"; - childrenUseStartTrans = 1; - }; - - class Bones { - class Pelvis : BaseRagdollBone { - name = "pelvis"; - type = "capsule"; - startBone = "pelvis"; - endBone = "spine2"; - mass = 15; - radius = 0.12; - networkType = "root"; - }; - - class Chest : BaseRagdollBone { - name = "chest"; - type = "capsule"; - startBone = "spine1"; - endBone = "neck"; - radius = 0.16; - mass = 15; - }; - - class Head : BaseRagdollBone { - name = "head"; - type = "sphere"; - startBone = "head"; - mass = 8; - radius = 0.16; - }; - - class LeftArm : BaseRagdollBone { - name = "leftArm"; - type = "capsule"; - startBone = "leftArm"; - endBone = "leftForeArm"; - mass = 8; - }; - - class LeftForeArm : BaseRagdollBone { - name = "leftForeArm"; - type = "capsule"; - startBone = "leftForeArm"; - endBone = "leftHand"; - mass = 6; - }; - - class LeftHand : BaseRagdollBone { - name = "leftHand"; - type = "sphere"; - startBone = "leftHand"; - mass = 6; - radius = 0.08; - childrenUseStartTrans = 0; - networkType = "leftHand"; - }; - - class RightArm : BaseRagdollBone { - name = "rightArm"; - type = "capsule"; - startBone = "rightArm"; - endBone = "rightForeArm"; - mass = 8; - }; - - class RightForeArm : BaseRagdollBone { - name = "rightForeArm"; - type = "capsule"; - startBone = "rightForeArm"; - endBone = "rightHand"; - mass = 6; - }; - - class RightHand : BaseRagdollBone { - name = "rightHand"; - type = "sphere"; - startBone = "rightHand"; - mass = 6; - radius = 0.08; - childrenUseStartTrans = 0; - networkType = "rightHand"; - }; - - class LeftUpLeg : BaseRagdollBone { - name = "leftUpLeg"; - type = "capsule"; - startBone = "leftUpLeg"; - endBone = "leftLeg"; - mass = 15; - }; - - class LeftLeg : BaseRagdollBone { - name = "leftLeg"; - type = "capsule"; - startBone = "leftLeg"; - endBone = "leftFoot"; - mass = 10; - }; - - class LeftFoot : BaseRagdollBone { - name = "leftFoot"; - type = "box"; - startBone = "leftFoot"; - size[] = {0.15, 0.035, 0.07}; - mass = 8; - networkType = "leftFoot"; - }; - - class RightUpLeg : BaseRagdollBone { - name = "rightUpLeg"; - type = "capsule"; - startBone = "rightUpLeg"; - endBone = "rightLeg"; - mass = 15; - }; - - class RightLeg : BaseRagdollBone { - name = "rightLeg"; - type = "capsule"; - startBone = "rightLeg"; - endBone = "rightFoot"; - mass = 10; - }; - - class RightFoot : BaseRagdollBone { - name = "rightFoot"; - type = "box"; - startBone = "rightFoot"; - size[] = {0.15, 0.035, 0.07}; - mass = 8; - networkType = "rightFoot"; - }; - - class Weapon : BaseRagdollBone { - name = "weapon"; - type = "weapon"; - startBone = "weapon"; - endPosRelToStart[] = {0.0, 1.0, 0.0}; - mass = 3; - }; - - class Launcher : BaseRagdollBone { - name = "launcher"; - type = "weapon"; - startBone = "launcher"; - endPosRelToStart[] = {1.0, 0.0, 0.0}; - mass = 3; - }; - }; - - class JointsPX2 { - class Pelvis_Chest_PX2 : RagDollSphericalJoint { - name = "pelvis_chest"; - bone1 = "pelvis"; - bone2 = "chest"; - axis[] = {0, 1, 0.3}; - - class SwingLimit : SwingLimit { - value = 25; - }; - - class TwistLimitLow : TwistLimitLow { - value = -15; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 25; - }; - }; - - class Chest_Head_PX2 : RagDollSphericalJoint { - name = "chest_head"; - bone1 = "chest"; - bone2 = "head"; - - class SwingLimit : SwingLimit { - value = 20; - }; - - class TwistLimitLow : TwistLimitLow { - value = -15; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 15; - }; - }; - - class Chest_LeftArm_PX2 : RagDollSphericalJoint { - name = "chest_leftArm"; - bone1 = "chest"; - bone2 = "leftArm"; - axis[] = {-1, 0.0, 0.5}; - enableCollision = 1; - - class SwingLimit : SwingLimit { - value = 60; - }; - - class TwistLimitLow : TwistLimitLow { - value = -20; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 20; - }; - }; - - class LeftArm_LeftForeArm_PX2 : RagDollRevoluteJoint { - name = "leftArm_leftForeArm"; - bone1 = "leftArm"; - bone2 = "leftForeArm"; - axis[] = {1, -1, 0.2}; - - class LimitLow : LimitLow { - value = -2; - }; - - class LimitHigh : LimitHigh { - value = 60; - }; - }; - - class LeftForeArm_LeftHand_PX2 : RagDollSphericalJoint { - name = "leftForeArm_leftHand"; - bone1 = "leftForeArm"; - bone2 = "leftHand"; - - class SwingLimit : SwingLimit { - value = 20; - }; - - class TwistLimitLow : TwistLimitLow { - value = -5; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 5; - }; - }; - - class Chest_RightArm_PX2 : RagDollSphericalJoint { - name = "chest_rightArm"; - bone1 = "chest"; - bone2 = "rightArm"; - axis[] = {1, 0.0, 0.5}; - enableCollision = 1; - - class SwingLimit : SwingLimit { - value = 60; - }; - - class TwistLimitLow : TwistLimitLow { - value = -20; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 20; - }; - }; - - class RightArm_RightForeArm_PX2 : RagDollRevoluteJoint { - name = "rightArm_rightForeArm"; - bone1 = "rightArm"; - bone2 = "rightForeArm"; - axis[] = {1, 1, -0.2}; - - class LimitLow : LimitLow { - value = -2; - }; - - class LimitHigh : LimitHigh { - value = 60; - }; - }; - - class RightForeArm_RightHand_PX2 : RagDollSphericalJoint { - name = "rightForeArm_rightHand"; - bone1 = "rightForeArm"; - bone2 = "rightHand"; - - class SwingLimit : SwingLimit { - value = 20; - }; - - class TwistLimitLow : TwistLimitLow { - value = -5; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 5; - }; - }; - - class Pelvis_LeftUpLeg_PX2 : RagDollSphericalJoint { - name = "pelvis_leftUpLeg"; - bone1 = "pelvis"; - bone2 = "leftUpLeg"; - axis[] = {-1.5, -1.1, 2}; - enableCollision = 1; - - class SwingLimit : SwingLimit { - value = 45; - }; - - class TwistLimitLow : TwistLimitLow { - value = -10; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 20; - }; - }; - - class LeftUpLeg_LeftLeg_PX2 : RagDollRevoluteJoint { - name = "leftUpLeg_leftLeg"; - bone1 = "leftUpLeg"; - bone2 = "leftLeg"; - axis[] = {-1, 0, 0}; - - class LimitLow : LimitLow { - value = -5; - }; - - class LimitHigh : LimitHigh { - value = 110; - }; - }; - - class LeftLeg_LeftFoot_PX2 : RagDollRevoluteJoint { - name = "leftLeg_leftFoot"; - bone1 = "leftLeg"; - bone2 = "leftFoot"; - axis[] = {-1, 0, 0}; - - class LimitLow : LimitLow { - value = -15; - }; - - class LimitHigh : LimitHigh { - value = 45; - }; - }; - - class Pelvis_RightUpLeg_PX2 : RagDollSphericalJoint { - name = "pelvis_rightUpLeg"; - bone1 = "pelvis"; - bone2 = "rightUpLeg"; - axis[] = {1.5, -1.1, 2}; - enableCollision = 1; - - class SwingLimit : SwingLimit { - value = 45; - }; - - class TwistLimitLow : TwistLimitLow { - value = -10; - }; - - class TwistLimitHigh : TwistLimitHigh { - value = 20; - }; - }; - - class RightUpLeg_RightLeg_PX2 : RagDollRevoluteJoint { - name = "rightUpLeg_rightLeg"; - bone1 = "rightUpLeg"; - bone2 = "rightLeg"; - axis[] = {-1, 0, 0}; - - class LimitLow : LimitLow { - value = -5; - }; - - class LimitHigh : LimitHigh { - value = 110; - }; - }; - - class RightLeg_RightFoot_PX2 : RagDollRevoluteJoint { - name = "rightLeg_rightFoot"; - bone1 = "rightLeg"; - bone2 = "rightFoot"; - axis[] = {-1, 0, 0}; - - class LimitLow : LimitLow { - value = -15; - }; - - class LimitHigh : LimitHigh { - value = 45; - }; - }; - }; - - class JointsPX3 { - class Pelvis_Chest_PX3 : RagDollD6Joint_PX3 { - name = "pelvis_chest"; - bone1 = "pelvis"; - bone2 = "chest"; - axis[] = {0, 1, 0.3}; - enableCollision = 0; - swingLimitY = 30; - swingLimitZ = 30; - twistLimitLower = -25; - twistLimitUpper = 25; - driveSpring = 30; - driveDamping = 30; - driveSpringWater = 5; - driveDampingWater = 5; - }; - - class Chest_Head_PX3 : RagDollD6Joint_PX3 { - name = "chest_head"; - bone1 = "chest"; - bone2 = "head"; - swingLimitY = 45; - swingLimitZ = 45; - twistLimitLower = -40; - twistLimitUpper = 40; - driveSpring = 15.0; - driveDamping = 30; - driveSpringWater = 1.5; - driveDampingWater = 3.0; - twistSpring = 15.0; - twistDamping = 30.0; - }; - - class Chest_LeftArm_PX3 : RagDollD6Joint_PX3 { - name = "chest_leftArm"; - bone1 = "chest"; - bone2 = "leftArm"; - enableCollision = 1; - swingLimitY = 85; - swingLimitZ = 85; - twistLimitLower = -60; - twistLimitUpper = 60; - driveSpring = 30; - driveDamping = 30; - driveSpringWater = 3; - driveDampingWater = 3; - }; - - class LeftArm_LeftForeArm_PX3 : RagDollD6Joint_PX3 { - name = "leftArm_leftForeArm"; - bone1 = "leftArm"; - bone2 = "leftForeArm"; - axis[] = {-1, 1, -0.2}; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -5; - twistLimitUpper = 150; - driveSpring = 10; - driveDamping = 10; - driveSpringWater = 1; - driveDampingWater = 1; - }; - - class LeftForeArm_LeftHand_PX3 : RagDollD6Joint_PX3 { - name = "leftForeArm_leftHand"; - bone1 = "leftForeArm"; - bone2 = "leftHand"; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -20; - twistLimitUpper = 20; - driveSpring = 10; - driveDamping = 10; - driveSpringWater = 1; - driveDampingWater = 1; - }; - - class Chest_RightArm_PX3 : RagDollD6Joint_PX3 { - name = "chest_rightArm"; - bone1 = "chest"; - bone2 = "rightArm"; - enableCollision = 1; - swingLimitY = 85; - swingLimitZ = 85; - twistLimitLower = -60; - twistLimitUpper = 60; - driveSpring = 30; - driveDamping = 30; - driveSpringWater = 3; - driveDampingWater = 3; - }; - - class RightArm_RightForeArm_PX3 : RagDollD6Joint_PX3 { - name = "rightArm_rightForeArm"; - bone1 = "rightArm"; - bone2 = "rightForeArm"; - axis[] = {-1, -1, 0.2}; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -5; - twistLimitUpper = 150; - driveSpring = 10; - driveDamping = 10; - driveSpringWater = 1; - driveDampingWater = 1; - }; - - class RightForeArm_RightHand_PX3 : RagDollD6Joint_PX3 { - name = "rightForeArm_rightHand"; - bone1 = "rightForeArm"; - bone2 = "rightHand"; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -20; - twistLimitUpper = 20; - driveSpring = 10; - driveDamping = 10; - driveSpringWater = 1; - driveDampingWater = 1; - }; - - class Pelvis_LeftUpLeg_PX3 : RagDollD6Joint_PX3 { - name = "pelvis_leftUpLeg"; - bone1 = "pelvis"; - bone2 = "leftUpLeg"; - enableCollision = 1; - swingLimitY = 35; - swingLimitZ = 35; - twistLimitLower = -10; - twistLimitUpper = 60; - driveSpring = 30; - driveDamping = 30; - driveSpringWater = 3; - driveDampingWater = 3; - twistDamping = 30.0; - }; - - class LeftUpLeg_LeftLeg_PX3 : RagDollD6Joint_PX3 { - name = "leftUpLeg_leftLeg"; - bone1 = "leftUpLeg"; - bone2 = "leftLeg"; - axis[] = {1, 0, 0}; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -5; - twistLimitUpper = 120; - driveSpring = 20; - driveDamping = 20; - driveSpringWater = 2; - driveDampingWater = 2; - }; - - class LeftLeg_LeftFoot_PX3 : RagDollD6Joint_PX3 { - name = "leftLeg_leftFoot"; - bone1 = "leftLeg"; - bone2 = "leftFoot"; - axis[] = {1, 0, 0}; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -15; - twistLimitUpper = 45; - driveSpring = 20; - driveDamping = 20; - driveSpringWater = 2; - driveDampingWater = 2; - }; - - class Pelvis_RightUpLeg_PX3 : RagDollD6Joint_PX3 { - name = "pelvis_rightUpLeg"; - bone1 = "pelvis"; - bone2 = "rightUpLeg"; - enableCollision = 1; - swingLimitY = 35; - swingLimitZ = 35; - twistLimitLower = -10; - twistLimitUpper = 60; - driveSpring = 30; - driveDamping = 30; - driveSpringWater = 3; - driveDampingWater = 3; - twistDamping = 30.0; - }; - - class RightUpLeg_RightLeg_PX3 : RagDollD6Joint_PX3 { - name = "rightUpLeg_rightLeg"; - bone1 = "rightUpLeg"; - bone2 = "rightLeg"; - axis[] = {1, 0, 0}; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -5; - twistLimitUpper = 120; - driveSpring = 20; - driveDamping = 20; - driveSpringWater = 2; - driveDampingWater = 2; - }; - - class RightLeg_RightFoot_PX3 : RagDollD6Joint_PX3 { - name = "rightLeg_rightFoot"; - bone1 = "rightLeg"; - bone2 = "rightFoot"; - axis[] = {1, 0, 0}; - swingLimitY = 10; - swingLimitZ = 10; - twistLimitLower = -15; - twistLimitUpper = 45; - driveSpring = 20; - driveDamping = 20; - driveSpringWater = 2; - driveDampingWater = 2; - }; - }; - }; -}; diff --git a/addons/ragdolls/script_component.hpp b/addons/ragdolls/script_component.hpp deleted file mode 100644 index e433e8d098..0000000000 --- a/addons/ragdolls/script_component.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#define COMPONENT ragdolls -#include "\z\ace\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define CBA_DEBUG_SYNCHRONOUS -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_RAGDOLLS - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_RAGDOLLS - #define DEBUG_SETTINGS DEBUG_SETTINGS_RAGDOLLS -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file From 89354e25c86f478bb6bb2030db5d2b10315faf98 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:09:48 -0300 Subject: [PATCH 16/64] Unified fired event handler --- addons/common/CfgEventHandlers.hpp | 5 +++ addons/common/XEH_preInit.sqf | 1 + addons/common/functions/fnc_firedEH.sqf | 51 +++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 addons/common/functions/fnc_firedEH.sqf diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index 55a1df4c7c..1afbe16512 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -59,3 +59,8 @@ class Extended_Local_EventHandlers { }; }; +class Extended_FiredBIS_EventHandlers { + class All { + ADDON = QUOTE(_this call FUNC(firedEH)); + }; +}; diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index ea5157c2e6..f119b99468 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -47,6 +47,7 @@ PREP(execRemoteFnc); PREP(executePersistent); PREP(filter); PREP(findUnloadPosition); +PREP(firedEH); PREP(fixCollision); PREP(fixFloating); PREP(fixLoweredRifleAnimation); diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf new file mode 100644 index 0000000000..c1bb1d77dc --- /dev/null +++ b/addons/common/functions/fnc_firedEH.sqf @@ -0,0 +1,51 @@ +/* + * Author: esteldunedain + * Unfied handling of weapon fire + * + * Argument: + * 0: unit - Object the event handler is assigned to + * 1: weapon - Fired weapon + * 2: muzzle - Muzzle that was used + * 3: mode - Current mode of the fired weapon + * 4: ammo - Ammo used + * 5: magazine - magazine name which was used + * 6: projectile - Object of the projectile that was shot + * + * Return value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +BEGIN_COUNTER(firedEH); + +params ["_firedEHUnit", "_firedEHWeapon", "_firedEHMuzzle", "_firedEHMode", "_firedEHAmmo", "_firedEHMagazine", "_firedEHProjectile"]; +TRACE_5("firedEH:",_firedEHUnit, _firedEHWeapon, _firedEHMuzzle, _firedEHMode, _firedEHAmmo, _firedEHMagazine, _firedEHProjectile); + +if (_firedEHUnit isKindOf "CAManBase") then { + // The unit it on foot + if (_firedEHUnit == ACE_player) then { + ["firedPlayer", this] call FUNC(localEvent); + } else { + if ([_firedEHUnit] call EFUNC(common,isPlayer)) then { + ["firedPlayerNonLocal", this] call FUNC(localEvent); + } else { + ["firedNonPlayer", this] call FUNC(localEvent); + }; + }; +} else { + // The unit is a vehicle + private _firedEHGunner = [_firedEHUnit, _firedEHWeapon] call EFUNC(common,getGunner); + if (_firedEHGunner == ACE_player) then { + ["firedPlayerVehicle", this] call FUNC(localEvent); + } else { + if ([_firedEHGunner] call EFUNC(common,isPlayer)) then { + ["firedPlayerVehicleNonLocal", this] call FUNC(localEvent); + } else { + ["firedNonPlayerVehicle", this] call FUNC(localEvent); + }; + }; +}; + +END_COUNTER(firedEH); From 588f76b3f13bd6622aa4bf752f5f3160cb465b25 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:12:18 -0300 Subject: [PATCH 17/64] Learning to count --- addons/common/functions/fnc_firedEH.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index c1bb1d77dc..911e122214 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -21,7 +21,7 @@ BEGIN_COUNTER(firedEH); params ["_firedEHUnit", "_firedEHWeapon", "_firedEHMuzzle", "_firedEHMode", "_firedEHAmmo", "_firedEHMagazine", "_firedEHProjectile"]; -TRACE_5("firedEH:",_firedEHUnit, _firedEHWeapon, _firedEHMuzzle, _firedEHMode, _firedEHAmmo, _firedEHMagazine, _firedEHProjectile); +TRACE_7("firedEH:",_firedEHUnit, _firedEHWeapon, _firedEHMuzzle, _firedEHMode, _firedEHAmmo, _firedEHMagazine, _firedEHProjectile); if (_firedEHUnit isKindOf "CAManBase") then { // The unit it on foot From 72b262f634d7b64347787f3516e7f4eae7166c22 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:22:23 -0300 Subject: [PATCH 18/64] Simplified parameter names --- addons/common/functions/fnc_firedEH.sqf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index 911e122214..6a6b36116e 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -20,15 +20,15 @@ BEGIN_COUNTER(firedEH); -params ["_firedEHUnit", "_firedEHWeapon", "_firedEHMuzzle", "_firedEHMode", "_firedEHAmmo", "_firedEHMagazine", "_firedEHProjectile"]; -TRACE_7("firedEH:",_firedEHUnit, _firedEHWeapon, _firedEHMuzzle, _firedEHMode, _firedEHAmmo, _firedEHMagazine, _firedEHProjectile); +params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; +TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile); -if (_firedEHUnit isKindOf "CAManBase") then { +if (_unit isKindOf "CAManBase") then { // The unit it on foot - if (_firedEHUnit == ACE_player) then { + if (_unit == ACE_player) then { ["firedPlayer", this] call FUNC(localEvent); } else { - if ([_firedEHUnit] call EFUNC(common,isPlayer)) then { + if ([_unit] call EFUNC(common,isPlayer)) then { ["firedPlayerNonLocal", this] call FUNC(localEvent); } else { ["firedNonPlayer", this] call FUNC(localEvent); @@ -36,11 +36,11 @@ if (_firedEHUnit isKindOf "CAManBase") then { }; } else { // The unit is a vehicle - private _firedEHGunner = [_firedEHUnit, _firedEHWeapon] call EFUNC(common,getGunner); - if (_firedEHGunner == ACE_player) then { + private _Gunner = [_unit, _weapon] call EFUNC(common,getGunner); + if (_Gunner == ACE_player) then { ["firedPlayerVehicle", this] call FUNC(localEvent); } else { - if ([_firedEHGunner] call EFUNC(common,isPlayer)) then { + if ([_Gunner] call EFUNC(common,isPlayer)) then { ["firedPlayerVehicleNonLocal", this] call FUNC(localEvent); } else { ["firedNonPlayerVehicle", this] call FUNC(localEvent); From 6d9068e3068e84101804db01b6dfb1885a12d4a2 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:26:57 -0300 Subject: [PATCH 19/64] gunner to lowercase --- addons/common/functions/fnc_firedEH.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index 6a6b36116e..5e6e5bb833 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -36,11 +36,11 @@ if (_unit isKindOf "CAManBase") then { }; } else { // The unit is a vehicle - private _Gunner = [_unit, _weapon] call EFUNC(common,getGunner); - if (_Gunner == ACE_player) then { + private _gunner = [_unit, _weapon] call EFUNC(common,getGunner); + if (_gunner == ACE_player) then { ["firedPlayerVehicle", this] call FUNC(localEvent); } else { - if ([_Gunner] call EFUNC(common,isPlayer)) then { + if ([_gunner] call EFUNC(common,isPlayer)) then { ["firedPlayerVehicleNonLocal", this] call FUNC(localEvent); } else { ["firedNonPlayerVehicle", this] call FUNC(localEvent); From b2bd11ed77086dbcf9885ef5d0bf8377a8a6b2b4 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:29:58 -0300 Subject: [PATCH 20/64] Apply the ufeh to ACE_FCS --- addons/fcs/CfgEventHandlers.hpp | 33 ---------------------------- addons/fcs/XEH_postInit.sqf | 4 ++++ addons/fcs/functions/fnc_firedEH.sqf | 9 +++----- 3 files changed, 7 insertions(+), 39 deletions(-) diff --git a/addons/fcs/CfgEventHandlers.hpp b/addons/fcs/CfgEventHandlers.hpp index ab41fa904b..8c5b768ca9 100644 --- a/addons/fcs/CfgEventHandlers.hpp +++ b/addons/fcs/CfgEventHandlers.hpp @@ -76,36 +76,3 @@ class Extended_Respawn_EventHandlers { }; }; }; - -class Extended_FiredBIS_EventHandlers { - class Tank { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; - class Car { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; - class Helicopter { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; - class Plane { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; - class Ship_F { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; - class StaticWeapon { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; -}; diff --git a/addons/fcs/XEH_postInit.sqf b/addons/fcs/XEH_postInit.sqf index a4f8020a9f..25fd09ba8c 100644 --- a/addons/fcs/XEH_postInit.sqf +++ b/addons/fcs/XEH_postInit.sqf @@ -15,5 +15,9 @@ if (!hasInterface) exitWith {}; }; }] call EFUNC(common,addEventHandler); +// Register fire event handler +["firedPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler); +["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + // Register event for global updates [QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call EFUNC(common,addEventHandler); diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 237aed8ac1..e407b44293 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -1,9 +1,9 @@ /* * Author: KoffeinFlummi - * Adjusts the direction of a shell. + * Adjusts the direction of a shell. Only gets called if the gunner is a player * * Arguments: - * -> arguments of the FiredBIS EH + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None @@ -12,9 +12,6 @@ */ #include "script_component.hpp" -params ["_vehicle", "_weapon", "", "", "_ammo", "_magazine", "_projectile"]; - -private _gunner = [_vehicle, _weapon] call EFUNC(common,getGunner); private _turret = _gunner call EFUNC(common,getTurretIndex); // Exit if the unit isn't a player @@ -36,7 +33,7 @@ private _offset = 0; [_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection); -// Remove the platform velocity +// Remove the platform velocity if (vectorMagnitude velocity _vehicle > 2) then { private _sumVelocity = (velocity _projectile) vectorDiff (velocity _vehicle); From a084373574edc1d0b79635e304520df40dfedc0b Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:39:08 -0300 Subject: [PATCH 21/64] Apply the ufeh to ACE_Disposable --- addons/disposable/CfgEventHandlers.hpp | 8 -------- addons/disposable/XEH_postInit.sqf | 5 +++++ addons/disposable/functions/fnc_replaceATWeapon.sqf | 11 +---------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/addons/disposable/CfgEventHandlers.hpp b/addons/disposable/CfgEventHandlers.hpp index 98fec255c2..c236fb6f57 100644 --- a/addons/disposable/CfgEventHandlers.hpp +++ b/addons/disposable/CfgEventHandlers.hpp @@ -10,14 +10,6 @@ class Extended_PostInit_EventHandlers { }; }; -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - firedBIS = QUOTE(_this call FUNC(replaceATWeapon)); - }; - }; -}; - // handle preloaded missile class Extended_InitPost_EventHandlers { class CAManBase { diff --git a/addons/disposable/XEH_postInit.sqf b/addons/disposable/XEH_postInit.sqf index 800d749d06..5c4ddafe95 100644 --- a/addons/disposable/XEH_postInit.sqf +++ b/addons/disposable/XEH_postInit.sqf @@ -12,3 +12,8 @@ if (!hasInterface) exitWith {}; [_unit] call FUNC(takeLoadedATWeapon); [_unit] call FUNC(updateInventoryDisplay); }] call EFUNC(common,addEventHandler); + +// Register fire event handler +// Only for the local player and for AI. Non-local players will handle it themselves +["firedPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler); +["firedNonPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler); diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index 88e27190ed..3e1b8afff8 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -3,13 +3,7 @@ * Replace the disposable launcher with the used dummy. * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Nothing @@ -21,9 +15,6 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon", "", "", "", "", "_projectile"]; -TRACE_3("params",_unit,_weapon,_projectile); - if (!local _unit || {_weapon != secondaryWeapon _unit}) exitWith {}; private _replacementTube = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_UsedTube"); From 59cbc6da10e91ceadf23181cecc3a12711190bf2 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:49:27 -0300 Subject: [PATCH 22/64] Remove unneeded test in FCS fireEH --- addons/fcs/functions/fnc_firedEH.sqf | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index e407b44293..4c101b9292 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -14,9 +14,6 @@ private _turret = _gunner call EFUNC(common,getTurretIndex); -// Exit if the unit isn't a player -if !([_gunner] call EFUNC(common,isPlayer)) exitWith {}; - private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []]; private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret]; From efbff8cc231db1d30bc2aeaf3fca2e8ac8dbdeaf Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:49:53 -0300 Subject: [PATCH 23/64] Pass the turret path too --- addons/common/functions/fnc_firedEH.sqf | 18 +++++++++++++++++- addons/fcs/functions/fnc_firedEH.sqf | 2 -- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index 5e6e5bb833..ce16b6dc2c 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -36,7 +36,23 @@ if (_unit isKindOf "CAManBase") then { }; } else { // The unit is a vehicle - private _gunner = [_unit, _weapon] call EFUNC(common,getGunner); + + // Get the gunner and turret path. + // Code based on FUNC(getGunner), extracted for efficency. + private _gunner = objNull; + private _turret = []; + { + if (_weapon in (_unit weaponsTurret _x)) exitWith { + _gunner = _unit turretUnit _x; + _turret = _x; + }; + false + } count allTurrets [_unit, true]; + // Ensure that at least the pilot is returned if there is no gunner + if (isManualFire _unit && {isNull _gunner}) then { + _gunner = driver _unit; + }; + if (_gunner == ACE_player) then { ["firedPlayerVehicle", this] call FUNC(localEvent); } else { diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 4c101b9292..29149eb19b 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -12,8 +12,6 @@ */ #include "script_component.hpp" -private _turret = _gunner call EFUNC(common,getTurretIndex); - private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []]; private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret]; From 37bc67c951e9272e6fa328185a11c4771122d876 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 16:55:36 -0300 Subject: [PATCH 24/64] Create a _vehicle variable --- addons/common/functions/fnc_firedEH.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index ce16b6dc2c..749364ee86 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -36,6 +36,7 @@ if (_unit isKindOf "CAManBase") then { }; } else { // The unit is a vehicle + private _vehicle = _unit; // Get the gunner and turret path. // Code based on FUNC(getGunner), extracted for efficency. From fe66d932758673c584904d5debe100f17360295b Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:07:05 -0300 Subject: [PATCH 25/64] Added ignore private warnings + trace --- addons/disposable/functions/fnc_replaceATWeapon.sqf | 5 ++++- addons/fcs/functions/fnc_firedEH.sqf | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index 3e1b8afff8..58c58a6056 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -1,6 +1,6 @@ /* * Author: bux, commy2 - * Replace the disposable launcher with the used dummy. + * Replace the disposable launcher with the used dummy. Called from the unified fired EH. * * Arguments: * None. Parameters inherited from EFUNC(common,firedEH) @@ -15,6 +15,9 @@ */ #include "script_component.hpp" +//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); + if (!local _unit || {_weapon != secondaryWeapon _unit}) exitWith {}; private _replacementTube = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_UsedTube"); diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 29149eb19b..a9f4975780 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -1,6 +1,6 @@ /* * Author: KoffeinFlummi - * Adjusts the direction of a shell. Only gets called if the gunner is a player + * Adjusts the direction of a shell. Called from the unified fired EH only if the gunner is a player. * * Arguments: * None. Parameters inherited from EFUNC(common,firedEH) @@ -12,6 +12,9 @@ */ #include "script_component.hpp" +//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); + private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []]; private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret]; From b70ae9207c9ac6b14bce17023d1f38bce8ed19b4 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:12:28 -0300 Subject: [PATCH 26/64] Apply the ufeh to ACE_Frag --- addons/frag/CfgEventhandlers.hpp | 6 ----- addons/frag/XEH_postInit.sqf | 16 ++++++++++++- addons/frag/functions/fnc_fired.sqf | 35 ++++++++++++++--------------- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/addons/frag/CfgEventhandlers.hpp b/addons/frag/CfgEventhandlers.hpp index df7eaeacd1..3b3f4898e5 100644 --- a/addons/frag/CfgEventhandlers.hpp +++ b/addons/frag/CfgEventhandlers.hpp @@ -9,9 +9,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class AllVehicles { - ADDON = QUOTE(_this call FUNC(fired)); - }; -}; diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index f49e5d1e3e..46910c519d 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -9,7 +9,21 @@ if(isServer) then { [QGVAR(frag_eh), { _this call FUNC(frago); }] call EFUNC(common,addEventHandler); }; -[FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler; +["SettingsInitialized", { + //If not enabled, exit + if (!GVAR(enabled)) exitWith {}; + + // Register fire event handler + ["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + ["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + ["firedNonPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + ["firedPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + ["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + ["firedNonPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + + [FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler; + +}] call EFUNC(common,addEventHandler); //Cache for ammo type configs GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0]; diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index 3e82544430..dbe1ab6347 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -1,12 +1,10 @@ /* * Author: nou, jaynus, PabstMirror - * Called from FiredBIS event on AllVehicles + * Called from the unified fired EH for all. * If spall is not enabled (default), then cache and only track those that will actually trigger fragmentation. * * Arguments: - * 0: gun - Object the event handler is assigned to - * 4: type - Ammo used - * 6: round - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Nothing @@ -19,38 +17,39 @@ // #define DEBUG_ENABLED_FRAG #include "script_component.hpp" -params ["_gun", "", "", "", "_type", "", "_round"]; +//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); -private _shouldAdd = GVAR(cacheRoundsTypesToTrack) getVariable _type; +private _shouldAdd = GVAR(cacheRoundsTypesToTrack) getVariable _ammo; if (isNil "_shouldAdd") then { - TRACE_1("no cache for round",_type); + TRACE_1("no cache for round",_ammo); if (!EGVAR(common,settingsInitFinished)) exitWith { //Just incase fired event happens before settings init, don't want to set cache wrong if spall setting changes - TRACE_1("Settings not init yet - exit without setting cache",_type); + TRACE_1("Settings not init yet - exit without setting cache",_ammo); _shouldAdd = false; }; if (GVAR(SpallEnabled)) exitWith { //Always want to run whenever spall is enabled? _shouldAdd = true; - TRACE_2("SettingCache[spallEnabled]",_type,_shouldAdd); - GVAR(cacheRoundsTypesToTrack) setVariable [_type, _shouldAdd]; + TRACE_2("SettingCache[spallEnabled]",_ammo,_shouldAdd); + GVAR(cacheRoundsTypesToTrack) setVariable [_ammo, _shouldAdd]; }; //Read configs and test if it would actually cause a frag, using same logic as FUNC(pfhRound) - private _skip = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip)); - private _explosive = getNumber (configFile >> "CfgAmmo" >> _type >> "explosive"); - private _indirectRange = getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"); - private _force = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force)); - private _fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))); + private _skip = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(skip)); + private _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive"); + private _indirectRange = getNumber (configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"); + private _force = getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(force)); + private _fragPower = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange")))); _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}}; TRACE_6("SettingCache[willFrag?]",_skip,_explosive,_indirectRange,_force,_fragPower,_shouldAdd); - GVAR(cacheRoundsTypesToTrack) setVariable [_type, _shouldAdd]; + GVAR(cacheRoundsTypesToTrack) setVariable [_ammo, _shouldAdd]; }; if (_shouldAdd) then { - TRACE_3("Running Frag Tracking",_gun,_type,_round); - [_gun, _type, _round] call FUNC(addPfhRound); + TRACE_3("Running Frag Tracking",_unit,_ammo,_projectile); + [_unit, _ammo, _projectile] call FUNC(addPfhRound); }; From ac3f75c8b450f403ddb89b894da879650c6c756f Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:16:10 -0300 Subject: [PATCH 27/64] Apply the ufeh to ACE_Goggles --- addons/goggles/CfgEventHandlers.hpp | 8 -------- addons/goggles/XEH_postInit.sqf | 3 +++ addons/goggles/functions/fnc_handleFired.sqf | 7 +++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/addons/goggles/CfgEventHandlers.hpp b/addons/goggles/CfgEventHandlers.hpp index 8c24b6d5ec..36bbadbb3e 100644 --- a/addons/goggles/CfgEventHandlers.hpp +++ b/addons/goggles/CfgEventHandlers.hpp @@ -19,14 +19,6 @@ class Extended_Killed_EventHandlers { }; }; -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - clientFiredBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(handleFired)}); - }; - }; -}; - class Extended_Explosion_EventHandlers { class CAManBase { class ADDON { diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index a4872f6a3f..832c961178 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -131,3 +131,6 @@ private _fnc_checkGoggles = { END_COUNTER(goggles); }, 0.5, []] call CBA_fnc_addPerFrameHandler; + +// Register fire event handler +["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index 793849822f..23a1b66f48 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -1,6 +1,6 @@ /* * Author: Garth 'L-H' de Wet, commy2 - * Determines whether to place dust on the goggles, based on calibre of weapon fired and other requirements. + * Determines whether to place dust on the goggles, based on calibre of weapon fired and other requirements. Called from the unified fired EH only for the local player. * * Arguments: * 0: Unit @@ -13,9 +13,8 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon"]; - -if (_unit != ACE_player) exitWith {true}; +//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); // no dust in rain if (rain > 0.1) exitWith {true}; From 0b9695ce70acff4abceb548d5a84148cf3f789fa Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:20:30 -0300 Subject: [PATCH 28/64] Apply the ufeh to ACE_Grenades --- addons/goggles/functions/fnc_handleFired.sqf | 3 +-- addons/grenades/CfgEventHandlers.hpp | 8 -------- addons/grenades/XEH_postInit.sqf | 6 ++++++ addons/grenades/functions/fnc_throwGrenade.sqf | 13 ++++--------- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index 23a1b66f48..dcfcc51bec 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -3,8 +3,7 @@ * Determines whether to place dust on the goggles, based on calibre of weapon fired and other requirements. Called from the unified fired EH only for the local player. * * Arguments: - * 0: Unit - * 1: Weapon + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Function is handled? diff --git a/addons/grenades/CfgEventHandlers.hpp b/addons/grenades/CfgEventHandlers.hpp index d93f8469bc..0cd959a047 100644 --- a/addons/grenades/CfgEventHandlers.hpp +++ b/addons/grenades/CfgEventHandlers.hpp @@ -10,11 +10,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - firedBIS = QUOTE(_this call FUNC(throwGrenade)); - }; - }; -}; diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index 54c2b06e8b..38945ccc11 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -22,3 +22,9 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true; }, {false}, [9, [false, false, false]], false] call CBA_fnc_addKeybind; //8 Key + + +// Register fire event handler +["firedPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); +["firedPlayerNonLocal", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); +["firedNonPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 1d7d470b80..284c573c2e 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -1,15 +1,9 @@ /* * Author: commy2 - * Adjust the grenades throwing direction and speed to the selected throwing mode. + * Adjust the grenades throwing direction and speed to the selected throwing mode. Called from the unified fired EH only for CAManBase * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None @@ -21,7 +15,8 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"]; +//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); if (_weapon != "Throw") exitWith {}; From 7ace1738c006eb5e036c26e7704ab2e350314de3 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:29:05 -0300 Subject: [PATCH 29/64] Apply the ufeh to ACE_HuntIr --- addons/huntir/CfgEventhandlers.hpp | 8 -------- addons/huntir/XEH_postInit.sqf | 5 +++++ addons/huntir/functions/fnc_handleFired.sqf | 15 ++++++--------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/addons/huntir/CfgEventhandlers.hpp b/addons/huntir/CfgEventhandlers.hpp index 308df09c1b..44b6e8e6ff 100644 --- a/addons/huntir/CfgEventhandlers.hpp +++ b/addons/huntir/CfgEventhandlers.hpp @@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - clientFiredBIS = QUOTE(_this call FUNC(handleFired)); - }; - }; -}; \ No newline at end of file diff --git a/addons/huntir/XEH_postInit.sqf b/addons/huntir/XEH_postInit.sqf index c5526500ac..0c518dfcea 100644 --- a/addons/huntir/XEH_postInit.sqf +++ b/addons/huntir/XEH_postInit.sqf @@ -7,3 +7,8 @@ GVAR(TI) = 0; GVAR(cur_cam) = 0; GVAR(ROTATE) = 0; GVAR(ELEVAT) = 0.01; + +// Register fire event handler +// Don't run for non players, as they are too dumb to launch huntirs anyway +["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); +["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 1919b4547c..551b9975b6 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -1,16 +1,10 @@ /* * Author: Norrin, Rocko, Ruthberg * - * Handles HuntIR projectiles + * Handles HuntIR projectiles. Called from the unified fired EH for all CAManBase. * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None @@ -19,10 +13,13 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; +//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); if (_ammo != "F_HuntIR") exitWith {}; +if (!hasInterface) exitWith {}; + [{ params ["_projectile"]; From 45b6b8467d5e65b3c7bb8ce80f6cf48649324dca Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:42:44 -0300 Subject: [PATCH 30/64] Apply the ufeh to ACE_Nightvision --- addons/nightvision/CfgEventHandlers.hpp | 8 -------- addons/nightvision/XEH_postInitClient.sqf | 4 ++++ addons/nightvision/functions/fnc_blending.sqf | 19 +++++-------------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/addons/nightvision/CfgEventHandlers.hpp b/addons/nightvision/CfgEventHandlers.hpp index 380f190f47..49b87fb4fd 100644 --- a/addons/nightvision/CfgEventHandlers.hpp +++ b/addons/nightvision/CfgEventHandlers.hpp @@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers { clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) ); }; }; - -class Extended_FiredBIS_EventHandlers { - class AllVehicles { - class ADDON { - clientFiredBIS = QUOTE( _this call FUNC(blending) ); - }; - }; -}; diff --git a/addons/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf index 0df7270317..1f73b12e93 100644 --- a/addons/nightvision/XEH_postInitClient.sqf +++ b/addons/nightvision/XEH_postInitClient.sqf @@ -70,3 +70,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; }, {false}, [209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT + +// Register fire event handler +["firedPlayer", DFUNC(blending)] call EFUNC(common,addEventHandler); +["firedPlayerVehicle", DFUNC(blending)] call EFUNC(common,addEventHandler); diff --git a/addons/nightvision/functions/fnc_blending.sqf b/addons/nightvision/functions/fnc_blending.sqf index 42d586248d..5c205fce5c 100644 --- a/addons/nightvision/functions/fnc_blending.sqf +++ b/addons/nightvision/functions/fnc_blending.sqf @@ -1,15 +1,9 @@ /* * Author: commy2 - * Change the blending when the player fires?? + * Change the blending when the player fires??. Called from the unified fired EH only for the local player and his vehicle. * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Nothing @@ -21,17 +15,14 @@ */ #include "script_component.hpp" -if (!hasInterface) exitWith {}; - -params ["_vehicle", "_weapon", "", "", "_ammo", "_magazine"]; +//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); private "_player"; _player = ACE_player; //If our vehicle didn't shoot, or we're not in NVG mode, exit -if ((_vehicle != (vehicle _player)) || {(currentVisionMode _player) != 1}) exitWith {}; -//If we are mounted, and it wasn't our weapon system that fired, exit -if (_player != _vehicle && {!(_weapon in (_vehicle weaponsTurret ([_player] call EFUNC(common,getTurretIndex))))}) exitWith {}; +if (currentVisionMode _player) != 1} exitWith {}; private["_darkness", "_nvgBrightnessCoef", "_silencer", "_visibleFire", "_visibleFireCoef", "_visibleFireTime", "_visibleFireTimeCoef"]; From 33bcd6d9f9b2dc817996a8c947697ce433528fb5 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:44:34 -0300 Subject: [PATCH 31/64] Fix --- addons/nightvision/functions/fnc_blending.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/nightvision/functions/fnc_blending.sqf b/addons/nightvision/functions/fnc_blending.sqf index 5c205fce5c..b34584a5d0 100644 --- a/addons/nightvision/functions/fnc_blending.sqf +++ b/addons/nightvision/functions/fnc_blending.sqf @@ -22,7 +22,7 @@ private "_player"; _player = ACE_player; //If our vehicle didn't shoot, or we're not in NVG mode, exit -if (currentVisionMode _player) != 1} exitWith {}; +if ((currentVisionMode _player) != 1) exitWith {}; private["_darkness", "_nvgBrightnessCoef", "_silencer", "_visibleFire", "_visibleFireCoef", "_visibleFireTime", "_visibleFireTimeCoef"]; From 5b3df2bcf7d621401453ae6795171ad6d407738e Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:50:35 -0300 Subject: [PATCH 32/64] Apply the ufeh to ACE_Optics --- addons/optics/CfgEventHandlers.hpp | 8 -------- addons/optics/XEH_postInit.sqf | 5 ++++- addons/optics/functions/fnc_handleFired.sqf | 16 ++++------------ 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/addons/optics/CfgEventHandlers.hpp b/addons/optics/CfgEventHandlers.hpp index 68962af2c4..e75956f440 100644 --- a/addons/optics/CfgEventHandlers.hpp +++ b/addons/optics/CfgEventHandlers.hpp @@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class AGM_Optics { - clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call DFUNC(handleFired)};); - }; - }; -}; diff --git a/addons/optics/XEH_postInit.sqf b/addons/optics/XEH_postInit.sqf index 2048db76c6..c9667f3931 100644 --- a/addons/optics/XEH_postInit.sqf +++ b/addons/optics/XEH_postInit.sqf @@ -10,7 +10,7 @@ GVAR(camera) = objNull; if ((!isNil {is3DEN}) && {is3DEN}) exitWith { ACE_LOGINFO("Eden detected: disabling Optics PIP Camera"); }; - + waitUntil {!isNull ACE_player}; waitUntil {sleep 1; {_x != GVAR(camera)} count allMissionObjects "camera" == 0 && {isNull curatorCamera}}; @@ -50,3 +50,6 @@ GVAR(camera) = objNull; GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"]; }; }] call EFUNC(common,addEventHandler); + +// Register fire event handler +["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); diff --git a/addons/optics/functions/fnc_handleFired.sqf b/addons/optics/functions/fnc_handleFired.sqf index f0399c37fc..299b2c30f4 100644 --- a/addons/optics/functions/fnc_handleFired.sqf +++ b/addons/optics/functions/fnc_handleFired.sqf @@ -2,26 +2,18 @@ * Original Author: Taosenai * Adapted By: KoffeinFlummi, commy2 * - * Animates the scope when firing. + * Animates the scope when firing. Called from the unified fired EH only for the local player. * * Arguments: - * 0: Unit (Object) - * 1: Weapon (String) - * 2: Muzzle (String) - * 3: Mode (String) - * 4: Ammo (Object) - * 5: Magazine (String) - * 6: Projectile (Object) + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None */ #include "script_component.hpp" -private ["_unit", "_weapon"]; - -_unit = _this select 0; -_weapon = _this select 1; +//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); // check if compatible scope is used private "_display"; From 5aa763f0c639ce5411114642fa950b0bc41d0f80 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 17:59:54 -0300 Subject: [PATCH 33/64] Apply the ufeh to ACE_Overheating --- addons/overheating/CfgEventHandlers.hpp | 8 ------- addons/overheating/XEH_postInit.sqf | 9 ++++++++ addons/overheating/functions/fnc_firedEH.sqf | 22 +++++++------------- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/addons/overheating/CfgEventHandlers.hpp b/addons/overheating/CfgEventHandlers.hpp index 7e4e0b35c7..7f43c8b903 100644 --- a/addons/overheating/CfgEventHandlers.hpp +++ b/addons/overheating/CfgEventHandlers.hpp @@ -10,14 +10,6 @@ class Extended_PostInit_EventHandlers { }; }; -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class GVAR(Overheat) { - clientFiredBIS = QUOTE(_this call FUNC(firedEH)); - }; - }; -}; - class Extended_Take_EventHandlers { class CAManBase { class GVAR(UnjamReload) { diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 76cdb090bb..38c0298b0f 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -36,3 +36,12 @@ GVAR(cacheWeaponData) setText QGVAR(cacheWeaponData); // Schedule cool down calculation of player weapons at (infrequent) regular intervals [] call FUNC(updateTemperatureThread); + +["SettingsInitialized", { + // Register fire event handler + ["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + // Only add eh to non local players if dispersion is enabled + if (GVAR(overheatingDispersion)) then { + ["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index b37e87c66d..604a2bb31d 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -1,15 +1,9 @@ /* * Author: Commy2 and esteldunedain - * Handle weapon fire + * Handle weapon fire. Called from the unified fired EH 1- always for the local player 2- and for non local players if dispersion is simulated. * * Argument: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return value: * None @@ -18,15 +12,13 @@ */ #include "script_component.hpp" +//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); + BEGIN_COUNTER(firedEH); -params ["_unit", "_weapon", "_muzzle", "", "_ammo", "", "_projectile"]; -TRACE_5("params",_unit,_weapon,_muzzle,_ammo,_projectile); - -if (((!GVAR(overheatingDispersion)) && {_unit != ACE_player}) //If no dispersion, only run when local - || {!([_unit] call EFUNC(common,isPlayer))} //Ignore AI - || {(_unit distance ACE_player) > 3000} //Ignore far away shots - || {(_muzzle != (primaryWeapon _unit)) && {_muzzle != (handgunWeapon _unit)}}) exitWith { // Only rifle or pistol muzzles (ignore grenades / GLs) +if ((_unit distance ACE_player) > 3000 //Ignore far away shots + || {(_muzzle != (primaryWeapon _unit)) && {_muzzle != (handgunWeapon _unit)}}) exitWith { // Only rifle or pistol muzzles (ignore grenades / GLs) END_COUNTER(firedEH); }; From 69dea087ca68756ed50546a48e2e8fc9d301ddd5 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 18:17:27 -0300 Subject: [PATCH 34/64] Apply the ufeh to ACE_Overpressure --- addons/overpressure/CfgEventHandlers.hpp | 39 -------- addons/overpressure/XEH_postInit.sqf | 4 + addons/overpressure/XEH_preInit.sqf | 2 - .../functions/fnc_fireLauncherBackblast.sqf | 95 ------------------- .../functions/fnc_fireOverpressureZone.sqf | 75 --------------- .../overpressure/functions/fnc_firedEHBB.sqf | 89 +++++++++++++---- .../overpressure/functions/fnc_firedEHOP.sqf | 64 ++++++++++--- 7 files changed, 123 insertions(+), 245 deletions(-) delete mode 100644 addons/overpressure/functions/fnc_fireLauncherBackblast.sqf delete mode 100644 addons/overpressure/functions/fnc_fireOverpressureZone.sqf diff --git a/addons/overpressure/CfgEventHandlers.hpp b/addons/overpressure/CfgEventHandlers.hpp index 472c253f7d..0cd959a047 100644 --- a/addons/overpressure/CfgEventHandlers.hpp +++ b/addons/overpressure/CfgEventHandlers.hpp @@ -10,42 +10,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - clientFiredBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHBB);};); - }; - }; - - class Tank { - class ADDON { - firedBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHOP);};); - }; - }; - class Car { - class ADDON { - firedBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHOP);};); - }; - }; - class Helicopter { - class ADDON { - firedBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHOP);};); - }; - }; - class Plane { - class ADDON { - firedBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHOP);};); - }; - }; - class Ship_F { - class ADDON { - firedBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHOP);};); - }; - }; - class StaticWeapon { - class ADDON { - firedBIS = QUOTE(if (local (_this select 0)) then {_this call FUNC(firedEHOP);};); - }; - }; -}; diff --git a/addons/overpressure/XEH_postInit.sqf b/addons/overpressure/XEH_postInit.sqf index 33c2e679c9..f7f0bc2ace 100644 --- a/addons/overpressure/XEH_postInit.sqf +++ b/addons/overpressure/XEH_postInit.sqf @@ -1,3 +1,7 @@ #include "script_component.hpp" ["overpressure", FUNC(overpressureDamage)] call EFUNC(common,addEventHandler); + +// Register fire event handler +["firedPlayer", DFUNC(firedEHBB)] call EFUNC(common,addEventHandler); +["firedPlayerVehicle", DFUNC(firedEHOP)] call EFUNC(common,addEventHandler); diff --git a/addons/overpressure/XEH_preInit.sqf b/addons/overpressure/XEH_preInit.sqf index d0ce7cbcf1..37f44a2e9a 100644 --- a/addons/overpressure/XEH_preInit.sqf +++ b/addons/overpressure/XEH_preInit.sqf @@ -2,8 +2,6 @@ ADDON = false; -PREP(fireLauncherBackblast); -PREP(fireOverpressureZone); PREP(getDistance); PREP(overpressureDamage); PREP(cacheOverPressureValues); diff --git a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf deleted file mode 100644 index 3b6691fb81..0000000000 --- a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Author: commy2 and esteldunedain - * Handle fire of local launchers - * Called from firedEHBB, only for ace_player with shot that will cause damage - * - * Arguments: - * 0: Unit that fired - * 1: Weapon fired - * 2: Muzzle - * 3: Mode - * 4: Ammo - * 5: Magazine - * 6: Projectile - * - * Return value: - * None - * - * Example: - * [player, "launch_RPG32_F", "launch_RPG32_F", "Single", "R_PG32V_F", "RPG32_F", projectile] call ace_overpressure_fnc_fireLauncherBackblast; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_firer", "_weapon", "_muzzle", "", "_ammo", "_magazine", "_projectile"]; -TRACE_6("params",_firer,_weapon,_muzzle,_ammo,_magazine,_projectile); - -private _position = getPosASL _projectile; -private _direction = [0, 0, 0] vectorDiff (vectorDir _projectile); - -// Bake variable name and check if the variable exists, call the caching function otherwise -private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil _varName) then { - [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); -} else { - missionNameSpace getVariable _varName; -}; -_var params["_backblastAngle","_backblastRange","_backblastDamage"]; -TRACE_3("cache",_backblastAngle,_backblastRange,_backblastDamage); - -// Damage to others -private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; - -// Let each client handle their own affected units -["overpressure", _affected, [_firer, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent); - -// Damage to the firer -private _distance = 2 * ([_position, _direction, _backblastRange, _firer] call FUNC(getDistance)); - -TRACE_1("Distance",_distance); - -if (_distance < _backblastRange) then { - private _alpha = sqrt (1 - _distance / _backblastRange); - private _beta = sqrt 0.5; - - private _damage = _alpha * _beta * _backblastDamage; - [_damage * 100] call BIS_fnc_bloodEffect; - - if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_firer] call EFUNC(medical,hasMedicalEnabled))}) then { - [_firer, _damage, "body", "backblast"] call EFUNC(medical,addDamageToUnit); - } else { - _firer setDamage (damage _firer + _damage); - }; -}; - -// Draw debug lines -#ifdef DEBUG_MODE_FULL - [ _position, - _position vectorAdd (_direction vectorMultiply _backblastRange), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - - private _ref = _direction call EFUNC(common,createOrthonormalReference); - [ _position, - _position vectorAdd (_direction vectorMultiply _backblastRange) vectorAdd ((_ref select 1) vectorMultiply _backblastRange * tan _backblastAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - [ _position, - _position vectorAdd (_direction vectorMultiply _backblastRange) vectorDiff ((_ref select 1) vectorMultiply _backblastRange * tan _backblastAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - [ _position, - _position vectorAdd (_direction vectorMultiply _backblastRange) vectorAdd ((_ref select 2) vectorMultiply _backblastRange * tan _backblastAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - [ _position, - _position vectorAdd (_direction vectorMultiply _backblastRange) vectorDiff ((_ref select 2) vectorMultiply _backblastRange * tan _backblastAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - - [ _position, - _position vectorAdd (_direction vectorMultiply ((_distance/2) min _backblastRange)), - [1,0,0,1] - ] call EFUNC(common,addLineToDebugDraw); -#endif diff --git a/addons/overpressure/functions/fnc_fireOverpressureZone.sqf b/addons/overpressure/functions/fnc_fireOverpressureZone.sqf deleted file mode 100644 index f254151307..0000000000 --- a/addons/overpressure/functions/fnc_fireOverpressureZone.sqf +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Author: commy2 and esteldunedain - * Handle fire of local vehicle weapons creating overpressure zones - * Called from firedEHOP, only for local vehicles - * - * Arguments: - * 0: Vehicle that fired - * 1: Weapon fired - * 2: Muzzle - * 3: Mode - * 4: Ammo - * 5: Magazine - * 6: Projectile - * - * Return value: - * None - * - * Example: - * [tank, "cannon_125mm", "cannon_125mm", "player", "Sh_125mm_APFSDS_T_Green", "24Rnd_125mm_APFSDS_T_Green", projectile] call ace_overpressure_fnc_fireOverpressureZone - * - * Public: No - */ -#include "script_component.hpp" - -params ["_firer", "_weapon", "_muzzle", "", "_ammo", "_magazine", "_projectile"]; -TRACE_6("params",_firer,_weapon,_muzzle,_ammo,_magazine,_projectile); - -// Prevent AI from causing overpressure damage (NOTE: Vehicle is local, but turret gunner may not be) -if !([gunner _firer] call EFUNC(common,isPlayer)) exitWith {}; - -private _position = getPosASL _projectile; -private _direction = vectorDir _projectile; - -// Bake variable name and check if the variable exists, call the caching function otherwise -private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _var = if (isNil _varName) then { - [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); -} else { - missionNameSpace getVariable _varName; -}; -_var params["_dangerZoneAngle","_dangerZoneRange","_dangerZoneDamage"]; -TRACE_3("cache",_dangerZoneAngle,_dangerZoneRange,_dangerZoneDamage); - -// Damage to others -private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; - -// Let each client handle their own affected units -["overpressure", _affected, [_firer, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent); - -// Draw debug lines -#ifdef DEBUG_MODE_FULL - [ _position, - _position vectorAdd (_direction vectorMultiply _dangerZoneRange), - [1,0,0,1] - ] call EFUNC(common,addLineToDebugDraw); - - private _ref = _direction call EFUNC(common,createOrthonormalReference); - [ _position, - _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorAdd ((_ref select 1) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - [ _position, - _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorDiff ((_ref select 1) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - [ _position, - _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorAdd ((_ref select 2) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - [ _position, - _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorDiff ((_ref select 2) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), - [1,1,0,1] - ] call EFUNC(common,addLineToDebugDraw); - -#endif diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 6327cc67c9..8dc15e0f0a 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -1,39 +1,90 @@ /* * Author: joko // Jonas - * Handle fire of local launchers + * Handle fire of local launchers. Called from the unified fired EH only for the local player. * * Arguments: - * 0: Unit that fired - * 1: Weapon fired - * 2: Muzzle - * 3: Mode - * 4: Ammo - * 5: Magazine - * 6: Projectile + * None. Parameters inherited from EFUNC(common,firedEH) * * Return value: * None * - * Example: + * Example: * [player, "launch_RPG32_F", "launch_RPG32_F", "Single", "R_PG32V_F", "RPG32_F", projectile] call ace_overpressure_fnc_firedEHBB; * * Public: No */ #include "script_component.hpp" -params ["_firer", "_weapon", "", "", "_ammo", "_magazine", ""]; - -// Prevent AI from causing backblast damage (fast exit to only run for local players) -if (_firer != ACE_player) exitWith {}; +//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); // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _damage = if (isNil _varName) then { - ([_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues)) select 2; +private _var = if (isNil _varName) then { + [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { - (missionNameSpace getVariable _varName) select 2; + missionNameSpace getVariable _varName; +}; +_var params["_backblastAngle","_backblastRange","_backblastDamage"]; +TRACE_3("cache",_backblastAngle,_backblastRange,_backblastDamage); + +if (_backblastDamage <= 0) exitWith {}; + +private _position = getPosASL _projectile; +private _direction = [0, 0, 0] vectorDiff (vectorDir _projectile); + +// Damage to others +private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange]; + +// Let each client handle their own affected units +["overpressure", _affected, [_unit, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent); + +// Damage to the firer +private _distance = 2 * ([_position, _direction, _backblastRange, _unit] call FUNC(getDistance)); + +TRACE_1("Distance",_distance); + +if (_distance < _backblastRange) then { + private _alpha = sqrt (1 - _distance / _backblastRange); + private _beta = sqrt 0.5; + + private _damage = _alpha * _beta * _backblastDamage; + [_damage * 100] call BIS_fnc_bloodEffect; + + if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_unit] call EFUNC(medical,hasMedicalEnabled))}) then { + [_unit, _damage, "body", "backblast"] call EFUNC(medical,addDamageToUnit); + } else { + _unit setDamage (damage _unit + _damage); + }; }; -if (_damage > 0) then { - _this call DFUNC(fireLauncherBackblast) -}; +// Draw debug lines +#ifdef DEBUG_MODE_FULL + [ _position, + _position vectorAdd (_direction vectorMultiply _backblastRange), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + + private _ref = _direction call EFUNC(common,createOrthonormalReference); + [ _position, + _position vectorAdd (_direction vectorMultiply _backblastRange) vectorAdd ((_ref select 1) vectorMultiply _backblastRange * tan _backblastAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + [ _position, + _position vectorAdd (_direction vectorMultiply _backblastRange) vectorDiff ((_ref select 1) vectorMultiply _backblastRange * tan _backblastAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + [ _position, + _position vectorAdd (_direction vectorMultiply _backblastRange) vectorAdd ((_ref select 2) vectorMultiply _backblastRange * tan _backblastAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + [ _position, + _position vectorAdd (_direction vectorMultiply _backblastRange) vectorDiff ((_ref select 2) vectorMultiply _backblastRange * tan _backblastAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + + [ _position, + _position vectorAdd (_direction vectorMultiply ((_distance/2) min _backblastRange)), + [1,0,0,1] + ] call EFUNC(common,addLineToDebugDraw); +#endif diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index fbcb034279..dff9215a52 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -1,15 +1,9 @@ /* * Author: joko // Jonas - * Handle fire of Vehicle Weapons + * Handle fire of Vehicle Weapons. Called from the unified fired EH only for the local player vehicle. * * Arguments: - * 0: Vehicle that fired (XEH will filter only local) - * 1: Weapon fired - * 2: Muzzle - * 3: Mode - * 4: Ammo - * 5: Magazine - * 6: Projectile + * None. Parameters inherited from EFUNC(common,firedEH) * * Return value: * None @@ -21,16 +15,56 @@ */ #include "script_component.hpp" -params ["", "_weapon", "", "", "_ammo", "_magazine", ""]; +//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); // Bake variable name and check if the variable exists, call the caching function otherwise private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine]; -private _damage = if (isNil _varName) then { - ([_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues)) select 2; +private _var = if (isNil _varName) then { + [_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues); } else { - (missionNameSpace getVariable _varName) select 2; + missionNameSpace getVariable _varName; }; +_var params["_dangerZoneAngle","_dangerZoneRange","_dangerZoneDamage"]; +TRACE_3("cache",_dangerZoneAngle,_dangerZoneRange,_dangerZoneDamage); -if (_damage > 0) then { - _this call DFUNC(fireOverpressureZone) -}; +if (_dangerZoneDamage <= 0) exitWith {}; + + + +// The weapon produces overpressure, calculate +private _position = getPosASL _projectile; +private _direction = vectorDir _projectile; + +// Damage to others +private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _dangerZoneRange]; + +// Let each client handle their own affected units +["overpressure", _affected, [_unit, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent); + +// Draw debug lines +#ifdef DEBUG_MODE_FULL + [ _position, + _position vectorAdd (_direction vectorMultiply _dangerZoneRange), + [1,0,0,1] + ] call EFUNC(common,addLineToDebugDraw); + + private _ref = _direction call EFUNC(common,createOrthonormalReference); + [ _position, + _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorAdd ((_ref select 1) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + [ _position, + _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorDiff ((_ref select 1) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + [ _position, + _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorAdd ((_ref select 2) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + [ _position, + _position vectorAdd (_direction vectorMultiply _dangerZoneRange) vectorDiff ((_ref select 2) vectorMultiply _dangerZoneRange * tan _dangerZoneAngle), + [1,1,0,1] + ] call EFUNC(common,addLineToDebugDraw); + +#endif From 12d7a171e5edf140ef15199112b41ba86caf09c3 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 18:21:43 -0300 Subject: [PATCH 35/64] Apply the ufeh to ACE_Recoil --- addons/recoil/CfgEventHandlers.hpp | 9 +++------ addons/recoil/XEH_postInit.sqf | 4 ++++ addons/recoil/functions/fnc_camshake.sqf | 11 +++++------ 3 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 addons/recoil/XEH_postInit.sqf diff --git a/addons/recoil/CfgEventHandlers.hpp b/addons/recoil/CfgEventHandlers.hpp index 60fc3892fc..76963cf182 100644 --- a/addons/recoil/CfgEventHandlers.hpp +++ b/addons/recoil/CfgEventHandlers.hpp @@ -1,14 +1,11 @@ - class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(camshake)};); - }; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; }; diff --git a/addons/recoil/XEH_postInit.sqf b/addons/recoil/XEH_postInit.sqf new file mode 100644 index 0000000000..e6b694646f --- /dev/null +++ b/addons/recoil/XEH_postInit.sqf @@ -0,0 +1,4 @@ +#include "script_component.hpp" + +// Register fire event handler +["firedPlayer", DFUNC(camShake)] call EFUNC(common,addEventHandler); diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index a8e1af75d9..deb454df71 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -1,12 +1,10 @@ /* * Author: Orginal by Ryan Schultz, edited by KoffeinFlummi, commy2 - * Adds camera shake when firing + * Adds camera shake when firing. Called from the unified fired EH only for the local player. * From TMR: Small Arms * * Arguments: - * 0: Unit - * 1: Weapon - * 3: Muzzle + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Nothing @@ -18,13 +16,14 @@ */ #include "script_component.hpp" +//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); + #define BASE_POWER 0.40 #define BASE_TIME 0.19 #define BASE_FREQ 13 #define RECOIL_COEF 40 -params ["_unit", "_weapon", "_muzzle"]; - if (toLower _weapon in ["throw", "put"]) exitWith {}; private _powerMod = ([0, -0.1, -0.1, 0, -0.2] select (["STAND", "CROUCH", "PRONE", "UNDEFINED", ""] find stance _unit)) + ([0, -1, 0, -1] select (["INTERNAL", "EXTERNAL", "GUNNER", "GROUP"] find cameraView)); From cdfdfffff62c7eab0eb003af30342de7626145ad Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 18:24:48 -0300 Subject: [PATCH 36/64] Apply the ufeh to ACE_Scopes --- addons/scopes/CfgEventHandlers.hpp | 8 -------- addons/scopes/XEH_postInit.sqf | 5 +++++ addons/scopes/functions/fnc_firedEH.sqf | 17 +++++------------ 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/addons/scopes/CfgEventHandlers.hpp b/addons/scopes/CfgEventHandlers.hpp index 5c23e0c462..e75956f440 100644 --- a/addons/scopes/CfgEventHandlers.hpp +++ b/addons/scopes/CfgEventHandlers.hpp @@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - firedBIS = QUOTE(_this call FUNC(firedEH);); - }; - }; -}; diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 41e7d53e17..8f2adeb0b7 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -136,3 +136,8 @@ if (!hasInterface) exitWith {}; }, {false}, [201, [true, true, false]], true] call CBA_fnc_addKeybind; + + +// Register fire event handler +["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); +["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index bb9c37a1af..d28c0dee7e 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -1,15 +1,9 @@ /* * Author: KoffeinFlummi, esteldunedain - * Adjusts the flight path of the bullet according to the zeroing + * Adjusts the flight path of the bullet according to the zeroing. Called from the unified fired EH only for local and non-local players on foot. * * Argument: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return value: * None @@ -18,12 +12,11 @@ */ #include "script_component.hpp" +//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); + private ["_adjustment", "_weaponIndex", "_zeroing", "_adjustment"]; -params ["_unit", "", "", "", "", "", "_projectile"]; - -if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; - _adjustment = _unit getVariable [QGVAR(Adjustment), []]; if (_adjustment isEqualTo []) exitWith {}; From 25b767a16bd1513ae5b9d1566d02f4e46087580a Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 18:27:43 -0300 Subject: [PATCH 37/64] Apply the ufeh to ACE_WeaponSelect --- addons/weaponselect/CfgEventHandlers.hpp | 8 -------- addons/weaponselect/XEH_postInit.sqf | 4 ++++ addons/weaponselect/functions/fnc_throwGrenade.sqf | 13 ++++--------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/addons/weaponselect/CfgEventHandlers.hpp b/addons/weaponselect/CfgEventHandlers.hpp index fd928fde2a..0cd959a047 100644 --- a/addons/weaponselect/CfgEventHandlers.hpp +++ b/addons/weaponselect/CfgEventHandlers.hpp @@ -10,11 +10,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class GVAR(throwGrenade) { - clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(throwGrenade)}); - }; - }; -}; diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index 450086aa91..87084ddf28 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -195,3 +195,7 @@ if (!hasInterface) exitWith {}; }, {false}, [10, [false, false, false]], false] call CBA_fnc_addKeybind; //9 Key + + +// Register fire event handler +["firedPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); diff --git a/addons/weaponselect/functions/fnc_throwGrenade.sqf b/addons/weaponselect/functions/fnc_throwGrenade.sqf index a99b06879b..3f55e02f51 100644 --- a/addons/weaponselect/functions/fnc_throwGrenade.sqf +++ b/addons/weaponselect/functions/fnc_throwGrenade.sqf @@ -1,15 +1,9 @@ /* * Author: commy2 - * Display Grenade information on grenade throw. + * Display Grenade information on grenade throw. Called from the unified fired EH only for the local player. * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None @@ -21,7 +15,8 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon", "", "", "", "_magazine"]; +//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); if (_weapon != "Throw") exitWith {}; From 1e66cd406b65fbeb0432d3536f0a6df630698618 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 6 Feb 2016 14:18:01 -0600 Subject: [PATCH 38/64] Use location hash for ace events --- addons/common/XEH_preInit.sqf | 3 +- .../common/functions/fnc__handleNetEvent.sqf | 9 +-- .../common/functions/fnc_addEventHandler.sqf | 15 +--- addons/common/functions/fnc_localEvent.sqf | 9 +-- .../functions/fnc_removeAllEventHandlers.sqf | 9 +-- .../functions/fnc_removeEventHandler.sqf | 11 +-- addons/common/tests/script_component.hpp | 1 + addons/common/tests/test_eventHandlers.sqf | 78 +++++++++++++++++++ 8 files changed, 96 insertions(+), 39 deletions(-) create mode 100644 addons/common/tests/script_component.hpp create mode 100644 addons/common/tests/test_eventHandlers.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index ea5157c2e6..0ee560420f 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -256,7 +256,8 @@ PREP(addCuratorUnloadEventhandler); PREP(fixCrateContent); //ACE events global variables -GVAR(events) = [[],[]]; +GVAR(eventsLocation) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0]; +GVAR(eventsLocation) setText QGVAR(eventsLocation); PREP(globalEvent); PREP(_handleNetEvent); diff --git a/addons/common/functions/fnc__handleNetEvent.sqf b/addons/common/functions/fnc__handleNetEvent.sqf index e3b2ac609c..54cef66228 100644 --- a/addons/common/functions/fnc__handleNetEvent.sqf +++ b/addons/common/functions/fnc__handleNetEvent.sqf @@ -16,12 +16,9 @@ params ["_eventType", "_event"]; if (_eventType == "ACEg") then { _event params ["_eventName", "_eventArgs"]; - GVAR(events) params ["_eventNames"]; - private _eventIndex = _eventNames find _eventName; - - if (_eventIndex != -1) then { - private _events = (GVAR(events) select 1) select _eventIndex; + private _eventFunctions = GVAR(eventsLocation) getVariable _eventName; + if (!isNil "_eventFunctions") then { #ifdef DEBUG_EVENTS ACE_LOGINFO_1("* Net Event %1",_eventName); @@ -35,7 +32,7 @@ if (_eventType == "ACEg") then { ACE_LOGINFO_1(" ID: %1",_forEachIndex); #endif }; - } forEach _events; + } forEach _eventFunctions; }; }; diff --git a/addons/common/functions/fnc_addEventHandler.sqf b/addons/common/functions/fnc_addEventHandler.sqf index 128f489701..e7df00f5ff 100644 --- a/addons/common/functions/fnc_addEventHandler.sqf +++ b/addons/common/functions/fnc_addEventHandler.sqf @@ -15,18 +15,11 @@ params ["_eventName", "_eventCode"]; -GVAR(events) params ["_eventNames"]; +private _eventFunctions = GVAR(eventsLocation) getVariable _eventName; -private _eventFunctions = []; -private _eventIndex = _eventNames find _eventName; - -if (_eventIndex != -1) then { - _eventFunctions = (GVAR(events) select 1) select _eventIndex; -} else { - private _eventNameCount = count _eventNames; - - _eventNames set [_eventNameCount, _eventName]; - (GVAR(events) select 1) set [_eventNameCount, _eventFunctions]; +if (isNil "_eventFunctions") then { + _eventFunctions = []; + GVAR(eventsLocation) setVariable [_eventName, _eventFunctions]; }; _eventFunctions pushBack _eventCode // Return event function count diff --git a/addons/common/functions/fnc_localEvent.sqf b/addons/common/functions/fnc_localEvent.sqf index 43f6209d0d..bf17cc0d0e 100644 --- a/addons/common/functions/fnc_localEvent.sqf +++ b/addons/common/functions/fnc_localEvent.sqf @@ -15,12 +15,9 @@ params ["_eventName", "_eventArgs"]; -GVAR(events) params ["_eventNames", "_eventArray"]; +private _eventFunctions = GVAR(eventsLocation) getVariable _eventName; -private _eventIndex = _eventNames find _eventName; - -if (_eventIndex != -1) then { - private _events = _eventArray select _eventIndex; +if (!isNil "_eventFunctions") then { #ifdef DEBUG_EVENTS ACE_LOGINFO_1("* Local Event: %1",_eventName); @@ -35,5 +32,5 @@ if (_eventIndex != -1) then { ACE_LOGINFO_1(" ID: %1",_forEachIndex); #endif }; - } forEach _events; + } forEach _eventFunctions; }; diff --git a/addons/common/functions/fnc_removeAllEventHandlers.sqf b/addons/common/functions/fnc_removeAllEventHandlers.sqf index a309d18d02..ed1cce278c 100644 --- a/addons/common/functions/fnc_removeAllEventHandlers.sqf +++ b/addons/common/functions/fnc_removeAllEventHandlers.sqf @@ -14,11 +14,4 @@ params ["_eventName"]; -GVAR(events) params ["_eventNames", "_events"]; - -private _eventFunctions = []; -private _eventIndex = _eventNames find _eventName; - -if (_eventIndex != -1) then { - _events set [_eventIndex, []]; -}; +GVAR(eventsLocation) setVariable [_eventName, nil]; diff --git a/addons/common/functions/fnc_removeEventHandler.sqf b/addons/common/functions/fnc_removeEventHandler.sqf index 5e307ad896..a0b5ed5333 100644 --- a/addons/common/functions/fnc_removeEventHandler.sqf +++ b/addons/common/functions/fnc_removeEventHandler.sqf @@ -15,12 +15,9 @@ params ["_eventName", "_eventCodeIndex"]; -GVAR(events) params ["_eventNames", "_events"]; +private _eventFunctions = GVAR(eventsLocation) getVariable _eventName; -private _eventFunctions = []; -private _eventIndex = _eventNames find _eventName; +if (isNil "_eventFunctions") exitWith {TRACE_1("eventName not found",_eventName);}; +if ((_eventCodeIndex < 0) || {(count _eventFunctions) <= _eventCodeIndex}) exitWith {TRACE_2("index out of bounds",_eventName,_eventCodeIndex);}; -if (_eventIndex != -1) then { - _eventFunctions = _events select _eventIndex; - _eventFunctions set [_eventCodeIndex, nil]; -}; +_eventFunctions set [_eventCodeIndex, nil]; diff --git a/addons/common/tests/script_component.hpp b/addons/common/tests/script_component.hpp new file mode 100644 index 0000000000..6a1bf9154d --- /dev/null +++ b/addons/common/tests/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\common\script_component.hpp" diff --git a/addons/common/tests/test_eventHandlers.sqf b/addons/common/tests/test_eventHandlers.sqf new file mode 100644 index 0000000000..5a75cb0a06 --- /dev/null +++ b/addons/common/tests/test_eventHandlers.sqf @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------- +#define DEBUG_MODE_FULL +#include "script_component.hpp" + +#ifndef TEST_DEFINED_AND_OP +if (true) exitWith {}; +#endif + +// ---------------------------------------------------------------------------- + +LOG('Testing EventHandlers'); + +TEST_DEFINED(QFUNC(_handleNetEvent),""); +TEST_DEFINED(QFUNC(addEventHandler),""); +TEST_DEFINED(QFUNC(localEvent),""); +TEST_DEFINED(QFUNC(targetEvent),""); +TEST_DEFINED(QFUNC(globalEvent),""); +TEST_DEFINED(QFUNC(serverEvent),""); +TEST_DEFINED(QFUNC(removeAllEventHandlers),""); +TEST_DEFINED(QFUNC(removeEventHandler),""); + +private _result = ["A", {}] call ace_common_fnc_addEventHandler; +private _expected = 0; +TEST_DEFINED_AND_OP(_result,==,_expected,"Adding first A EH"); + +_result = ["A", {GVAR(test_A2) = _this}] call ace_common_fnc_addEventHandler; +_expected = 1; +TEST_DEFINED_AND_OP(_result,==,_expected,"Adding second A EH"); + +_result = ["A", {GVAR(test_A3) = _this}] call ace_common_fnc_addEventHandler; +_expected = 2; +TEST_DEFINED_AND_OP(_result,==,_expected,"Adding third A EH"); + +GVAR(test_A2) = -1; +["A", 11] call FUNC(localEvent); +_expected = 11; +_result = GVAR(test_A2); +TEST_DEFINED_AND_OP(_result,==,_expected,"Test Local Event"); + +//Remove 2nd EH +["A", 1] call FUNC(removeEventHandler); + +GVAR(test_A2) = -1; +GVAR(test_A3) = -1; +["A", 22] call FUNC(localEvent); +_expected = -1; +_result = GVAR(test_A2); +TEST_DEFINED_AND_OP(_result,==,_expected,"Test 2nd (removed) EH"); +_expected = 22; +_result = GVAR(test_A3); +TEST_DEFINED_AND_OP(_result,==,_expected,"Test 3rd Event"); + +//Remove All EH: +["A"] call FUNC(removeAllEventHandlers); + +GVAR(test_A3) = -1; +["A", 77] call FUNC(localEvent); +_expected = -1; +_result = GVAR(test_A3); +TEST_DEFINED_AND_OP(_result,==,_expected,"Test 3rd is removed after removeAll"); + +//Much harder to test network events +TRACE_2("testing network events",isServer,isDedicated); + +["B", {GVAR(test_B) = _this}] call ace_common_fnc_addEventHandler; + +GVAR(test_B) = -1; +["B", 33] call FUNC(globalEvent); +_expected = 33; +_result = GVAR(test_B); +TEST_DEFINED_AND_OP(_result,==,_expected,"Test globalEvent"); + +GVAR(test_B) = -1; +["B", 44] call FUNC(serverEvent); +_expected = if (isServer) then {44} else {-1}; +_result = GVAR(test_B); +TEST_DEFINED_AND_OP(_result,==,_expected,"Test serverEvent"); + From 94ef0c5659d23dad96a38b61ea4e9ccdb80f94de Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 18:36:20 -0300 Subject: [PATCH 39/64] Apply the ufeh to ACE_WindDeflection --- addons/winddeflection/CfgEventHandlers.hpp | 7 ------- addons/winddeflection/XEH_postInit.sqf | 9 +++++++++ .../functions/fnc_handleFired.sqf | 19 ++++--------------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/addons/winddeflection/CfgEventHandlers.hpp b/addons/winddeflection/CfgEventHandlers.hpp index a835fd0e88..917a0acbd7 100644 --- a/addons/winddeflection/CfgEventHandlers.hpp +++ b/addons/winddeflection/CfgEventHandlers.hpp @@ -8,10 +8,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; -class Extended_FiredBIS_EventHandlers { - class AllVehicles { - class ADDON { - firedBIS = QUOTE(_this call FUNC(handleFired)); - }; - }; -}; diff --git a/addons/winddeflection/XEH_postInit.sqf b/addons/winddeflection/XEH_postInit.sqf index ff9e2427f4..14b4db1def 100644 --- a/addons/winddeflection/XEH_postInit.sqf +++ b/addons/winddeflection/XEH_postInit.sqf @@ -8,6 +8,15 @@ GVAR(trackedBullets) = []; //If not enabled, dont't add PFEH if (!GVAR(enabled)) exitWith {}; + // Register fire event handler + ["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + ["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + + if (GVAR(vehicleEnabled)) then { + ["firedPlayerVehicle", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + ["firedPlayerVehicleNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + }; + [] call FUNC(updateTrajectoryPFH); }] call EFUNC(common,addEventHandler); diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index a3c51054ee..6910d4e830 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -1,15 +1,9 @@ /* * Author: Glowbal, Ruthberg - * Handles wind deflection for projectiles. + * Handles wind deflection for projectiles. Called from the unified fired EH only for players on foot and their vehicles if required by settings. * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Nothing @@ -21,17 +15,12 @@ */ #include "script_component.hpp" -params ["_unit", "", "", "", "_ammo", "", "_bullet"]; +//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); if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && (_bullet isKindOf "BulletBase") && (_unit isKindOf "Man")) exitWith {false}; -if (!hasInterface) exitWith {false}; -if (!(GVAR(enabled))) exitWith {false}; -if (!(GVAR(vehicleEnabled)) && !(_unit isKindOf "Man")) exitWith {false}; if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exitWith {false}; if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; -if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; - -true; \ No newline at end of file From b7d94f53630fe397b1e02f0c2d84a6ba32840136 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 18:48:26 -0300 Subject: [PATCH 40/64] Apply the ufeh to ACE_Advanced_Ballistics --- .../advanced_ballistics/CfgEventHandlers.hpp | 8 ----- addons/advanced_ballistics/XEH_postInit.sqf | 14 ++++++++ .../functions/fnc_handleFired.sqf | 32 +++++++------------ 3 files changed, 25 insertions(+), 29 deletions(-) diff --git a/addons/advanced_ballistics/CfgEventHandlers.hpp b/addons/advanced_ballistics/CfgEventHandlers.hpp index cc1414eb8f..44b6e8e6ff 100644 --- a/addons/advanced_ballistics/CfgEventHandlers.hpp +++ b/addons/advanced_ballistics/CfgEventHandlers.hpp @@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - firedBIS = QUOTE(_this call FUNC(handleFired)); - }; - }; -}; \ No newline at end of file diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index 1f9002e606..20c0622eac 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -22,3 +22,17 @@ if (!GVAR(extensionAvailable)) exitWith { }; */ [] call FUNC(initializeTerrainExtension); + +if (!hasInterface) exitWith {}; + +["SettingsInitialized", { + //If not enabled, dont't add PFEH + if (!GVAR(enabled)) exitWith {}; + + // Register fire event handler + ["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + ["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + + [] call FUNC(updateTrajectoryPFH); + +}] call EFUNC(common,addEventHandler); diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 90eacf2928..9646f065d4 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -1,16 +1,10 @@ /* * Author: Glowbal, Ruthberg * - * Handles advanced ballistics for (BulletBase) projectiles + * Handles advanced ballistics for (BulletBase) projectiles. Called from the unified fired EH only for players. * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None @@ -19,20 +13,16 @@ */ #include "script_component.hpp" -// Early Quiting -if (!hasInterface) exitWith {}; -if (!GVAR(enabled)) exitWith {}; +//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); // Parameterization private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"]; -params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"]; - _abort = false; if (!(_ammo isKindOf "BulletBase")) exitWith {}; -if (!alive _bullet) exitWith {}; -if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; +if (!alive _projectile) exitWith {}; if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {}; if (underwater _unit) exitWith {}; if (!GVAR(simulateForEveryone) && !(local _unit)) then { @@ -54,7 +44,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea if (_abort || !(GVAR(extensionAvailable))) exitWith { if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; + EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; }; }; @@ -72,7 +62,7 @@ _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMas _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; -_bulletVelocity = velocity _bullet; +_bulletVelocity = velocity _projectile; _muzzleVelocity = vectorMagnitude _bulletVelocity; _barrelVelocityShift = 0; @@ -92,7 +82,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { if (_muzzleVelocityShift != 0) then { _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); - _bullet setVelocity _bulletVelocity; + _projectile setVelocity _bulletVelocity; }; }; @@ -114,16 +104,16 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th if (isNil "_temperature") then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); }; - _barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure); + _barometricPressure = ((getPosASL _projectile) select 2) call EFUNC(weather,calculateBarometricPressure); _stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor); }; GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; _aceTimeSecond = floor ACE_time; -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond]; +"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond]; -GVAR(allBullets) pushBack [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]; +GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]; if (isNil QGVAR(BulletPFH)) then { GVAR(BulletPFH) = [FUNC(handleFirePFH), GVAR(simulationInterval), []] call CBA_fnc_addPerFrameHandler; From a51372a6b3751e9a7ddce442bc884b4580e6c7d6 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 20:28:16 -0300 Subject: [PATCH 41/64] Add the TRACE_10 macro --- addons/main/script_macros.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 3d4bc31c99..544cff6842 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -198,4 +198,13 @@ #define ACE_DEPRECATED(arg1,arg2,arg3) ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3) +#define PFORMAT_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9, I=%10 J=%11', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H), RETNIL(I), RETNIL(J)] +#ifdef DEBUG_MODE_FULL +#define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) \ + [THIS_FILE_, __LINE__, PFORMAT_10(MESSAGE,A,B,C,D,E,F,G,H,I,J)] call CBA_fnc_log +#else + #define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) /* disabled */ +#endif + #include "script_debug.hpp" From 8fbb6cd72e9a2aa077f287bf2852108a6133c68e Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 20:49:18 -0300 Subject: [PATCH 42/64] Fixed event parameters --- addons/common/functions/fnc_firedEH.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index 749364ee86..c11f6d990f 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -26,12 +26,12 @@ TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile if (_unit isKindOf "CAManBase") then { // The unit it on foot if (_unit == ACE_player) then { - ["firedPlayer", this] call FUNC(localEvent); + ["firedPlayer", _this] call FUNC(localEvent); } else { if ([_unit] call EFUNC(common,isPlayer)) then { - ["firedPlayerNonLocal", this] call FUNC(localEvent); + ["firedPlayerNonLocal", _this] call FUNC(localEvent); } else { - ["firedNonPlayer", this] call FUNC(localEvent); + ["firedNonPlayer", _this] call FUNC(localEvent); }; }; } else { @@ -55,12 +55,12 @@ if (_unit isKindOf "CAManBase") then { }; if (_gunner == ACE_player) then { - ["firedPlayerVehicle", this] call FUNC(localEvent); + ["firedPlayerVehicle", _this] call FUNC(localEvent); } else { if ([_gunner] call EFUNC(common,isPlayer)) then { - ["firedPlayerVehicleNonLocal", this] call FUNC(localEvent); + ["firedPlayerVehicleNonLocal", _this] call FUNC(localEvent); } else { - ["firedNonPlayerVehicle", this] call FUNC(localEvent); + ["firedNonPlayerVehicle", _this] call FUNC(localEvent); }; }; }; From e4122cf42f8d004c56c187003a5a8bab6976c880 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 21:00:42 -0300 Subject: [PATCH 43/64] Fix winddeflection fire eh --- addons/winddeflection/functions/fnc_handleFired.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 6910d4e830..e2bfca394f 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -18,9 +18,9 @@ //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); -if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && (_bullet isKindOf "BulletBase") && (_unit isKindOf "Man")) exitWith {false}; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && (_projectile isKindOf "BulletBase") && (_unit isKindOf "Man")) exitWith {false}; -if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exitWith {false}; +if (!((_projectile isKindOf "BulletBase") || (_projectile isKindOf "GrenadeBase"))) exitWith {false}; if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; -GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; +GVAR(trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; From b6058242c8be6539e93fbd19d61d5b03d5cde024 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 6 Feb 2016 22:20:08 -0300 Subject: [PATCH 44/64] Fix frag fired EH name --- addons/frag/XEH_postInit.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 46910c519d..977866e24e 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -14,12 +14,12 @@ if(isServer) then { if (!GVAR(enabled)) exitWith {}; // Register fire event handler - ["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); - ["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); - ["firedNonPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); - ["firedPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler); - ["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); - ["firedNonPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler); + ["firedPlayer", DFUNC(fired)] call EFUNC(common,addEventHandler); + ["firedPlayerNonLocal", DFUNC(fired)] call EFUNC(common,addEventHandler); + ["firedNonPlayer", DFUNC(fired)] call EFUNC(common,addEventHandler); + ["firedPlayerVehicle", DFUNC(fired)] call EFUNC(common,addEventHandler); + ["firedPlayerVehicleNonLocal", DFUNC(fired)] call EFUNC(common,addEventHandler); + ["firedNonPlayerVehicle", DFUNC(fired)] call EFUNC(common,addEventHandler); [FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler; From f1cc2ddd51817c838109ff63194ab2035f45a5ad Mon Sep 17 00:00:00 2001 From: VKing Date: Sun, 7 Feb 2016 13:08:31 +0100 Subject: [PATCH 45/64] Change to apply in fcs --- addons/fcs/functions/fnc_calculateSolution.sqf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index f59b4f6fbc..9908832824 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -43,10 +43,7 @@ private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret } count _muzzles; // Fix the `in` operator being case sensitive and BI fucking up the spelling of their own classnames - private _weaponMagazinesCheck = []; - { - _weaponMagazinesCheck pushBack (toLower _x); - } forEach _weaponMagazines; + private _weaponMagazinesCheck = _weaponMagazines apply {toLower _x}; // Another BIS fix: ShotBullet simulation uses weapon initSpeed, others ignore it if (toLower _magazine in _weaponMagazinesCheck && {_bulletSimulation == "shotBullet"}) exitWith { From f92b79858654279b54cb949412a2485c0468c9d0 Mon Sep 17 00:00:00 2001 From: VKing Date: Sun, 7 Feb 2016 13:09:01 +0100 Subject: [PATCH 46/64] Switch to select (is even slightly faster) --- addons/explosives/functions/fnc_getDetonators.sqf | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/addons/explosives/functions/fnc_getDetonators.sqf b/addons/explosives/functions/fnc_getDetonators.sqf index 22360c875e..d8c095e6f0 100644 --- a/addons/explosives/functions/fnc_getDetonators.sqf +++ b/addons/explosives/functions/fnc_getDetonators.sqf @@ -19,16 +19,7 @@ params ["_unit"]; TRACE_1("params",_unit); -private ["_items", "_result", "_config"]; - -_items = (items _unit); -_result = []; - -{ - _config = ConfigFile >> "CfgWeapons" >> _x; - if (getNumber (_config >> QGVAR(Detonator)) == 1 && {!(_x in _result)}) then { - _result pushBack _x; - }; -} forEach _items; +private _result = (items _unit) select {getNumber (ConfigFile >> "CfgWeapons" >> _x >> QGVAR(Detonator)) == 1}; +_result = _result arrayIntersect _result; _result From cebc8a2d07c443da2baa89fc4891407fa2c551d9 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Mon, 8 Feb 2016 19:19:10 -0300 Subject: [PATCH 47/64] Slightly reduce the distance for which the LOS check is skipped. Fix #3270 --- addons/interact_menu/functions/fnc_renderBaseMenu.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 2bb2808b28..57ded33be0 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -41,8 +41,8 @@ if ((GVAR(openedMenuType) == 0) && {vehicle ACE_player == ACE_player} && {isNull if (_distanceToBasePoint > _distance) exitWith {true}; - if ((_distanceToBasePoint > 1.5) && {!(_params select 4)}) exitWith { - // If distance to action is greater than 1.5 m and check isn't disabled in params, check LOS + if ((_distanceToBasePoint > 1.2) && {!(_params select 4)}) exitWith { + // If distance to action is greater than 1.2 m and check isn't disabled in params, check LOS lineIntersects [AGLtoASL _headPos, AGLtoASL _pos, _object, ACE_player] }; false From 8048b2ecbd6355d9bcb40fe4537b7180bd185e58 Mon Sep 17 00:00:00 2001 From: gienkov Date: Tue, 9 Feb 2016 09:35:16 +0100 Subject: [PATCH 48/64] lazy evaluation fix --- addons/refuel/functions/fnc_canConnectNozzle.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/refuel/functions/fnc_canConnectNozzle.sqf b/addons/refuel/functions/fnc_canConnectNozzle.sqf index f8503c821f..d2111fdb66 100644 --- a/addons/refuel/functions/fnc_canConnectNozzle.sqf +++ b/addons/refuel/functions/fnc_canConnectNozzle.sqf @@ -22,5 +22,6 @@ params ["_unit", "_target"]; _nozzle = _unit getVariable [QGVAR(nozzle), objNull]; !(isNull _nozzle || + {isEngineOn _target} || {(_target distance _unit) > REFUEL_ACTION_DISTANCE} || - {!isNull (_target getVariable [QGVAR(nozzle), objNull])} || isEngineOn _target) // TODO verify cant connect multiple fuel lines + {!isNull (_target getVariable [QGVAR(nozzle), objNull])}) // TODO verify cant connect multiple fuel lines From 34d9b7d4ea14c37a195466069eeb6a982090857a Mon Sep 17 00:00:00 2001 From: licht-im-Norden87 Date: Wed, 10 Feb 2016 04:26:21 +0100 Subject: [PATCH 49/64] Update README_DE.md --- docs/README_DE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/README_DE.md b/docs/README_DE.md index 98e41d1ae0..0ec65d61c6 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -1,12 +1,12 @@

- +

- ACE3 Version + ACE3 Version - + ACE3 Download @@ -25,6 +25,7 @@ ACE3 Build Status

+

Benötigt die aktuellste Version vonCBA A3.
Besucht uns auf Twitter | Facebook | YouTube | Reddit
From e1b83b8172d3f1bf95c22baec9339219334198cb Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 9 Feb 2016 22:43:38 -0600 Subject: [PATCH 50/64] Manually pre-load for StaticWeapons and Car Fix #3168 --- addons/medical/XEH_preInit.sqf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 5deaf77ceb..b8a223510f 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -125,4 +125,25 @@ call FUNC(parseConfigForInjuries); GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; +//Hack for #3168 (units in static weapons do not take any damage): +//doing a manual pre-load with a small distance seems to fix the LOD problems with handle damage not returning full results +GVAR(fixedStatics) = []; +private _fixStatic = { + params ["_vehicle"]; + private _vehType = typeOf _vehicle; + TRACE_2("",_vehicle,_vehType); + if (!(_vehType in GVAR(fixedStatics))) then { + GVAR(fixedStatics) pushBack _vehType; + TRACE_1("starting preload",_vehType); + [{ + 1 preloadObject (_this select 0); + }, { + TRACE_1("preload done",_this); + }, [_vehType]] call EFUNC(common,waitUntilAndExecute); + }; +}; +["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler; +["Car", "init", _fixStatic] call CBA_fnc_addClassEventHandler; + + ADDON = true; From ff4ba98e6830b42a8f68851a1dbf099933a17ea7 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 10 Feb 2016 11:50:30 -0600 Subject: [PATCH 51/64] Pre-load again on mission load (save game) --- addons/medical/XEH_preInit.sqf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index b8a223510f..189d6b207d 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -144,6 +144,16 @@ private _fixStatic = { }; ["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler; ["Car", "init", _fixStatic] call CBA_fnc_addClassEventHandler; +addMissionEventHandler ["Loaded",{ + { + TRACE_1("starting preload (save load)",_x); + [{ + 1 preloadObject (_this select 0); + }, { + TRACE_1("preload done",_this); + }, [_x]] call EFUNC(common,waitUntilAndExecute); + } forEach GVAR(fixedStatics); +}]; ADDON = true; From 54b350a6c05d90c17165f9f97837f2fc6026ace9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 12 Feb 2016 15:48:06 -0600 Subject: [PATCH 52/64] Only get passenger actions for selected unit Fix #1690 #3309 --- .../functions/fnc_addPassengerActions.sqf | 8 ++--- .../functions/fnc_addPassengersActions.sqf | 33 ++++++++++++------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index 20de00e315..47a845601b 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -20,12 +20,10 @@ params ["", "", "_parameters"]; _parameters params ["_unit"]; -private ["_varName", "_actionTrees", "_actions"]; +private _varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit]; +private _actionTrees = missionNamespace getVariable [_varName, []]; -_varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit]; -_actionTrees = missionNamespace getVariable [_varName, []]; - -_actions = []; +private _actions = []; // Mount unit MainActions menu { diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 7296b34fa2..8ee95b7eb9 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -23,12 +23,10 @@ private "_actions"; _actions = []; { - private ["_unit", "_icon"]; - - _unit = _x; + private _unit = _x; if (_unit != _player && {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "simulation") != "UAVPilot"}) then { - _icon = [ + private _icon = [ "", "A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa", "A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_gunner_ca.paa", @@ -44,14 +42,27 @@ _actions = []; format ["%1", _unit], [_unit, true] call EFUNC(common,getName), _icon, - {}, + { + //statement (Run on hover) - reset the cache so we will insert actions immedietly when hovering over new unit + TRACE_2("Cleaning Cache",_target,vehicle _target); + [vehicle _target, QEGVAR(interact_menu,ATCache_ACE_SelfActions)] call EFUNC(common,eraseCache); + }, {true}, - {_this call FUNC(addPassengerActions)}, - [_unit] - ] call EFUNC(interact_menu,createAction), - [], - _unit - ]; + { + if (EGVAR(interact_menu,selectedTarget) isEqualTo _target) then { + _this call FUNC(addPassengerActions) + } else { + [] //not selected, don't waste time on actions + }; + }, + [_unit], + {[0, 0, 0]}, + 2, + [false,false,false,true,false] //add run on hover (4th bit true) + ] call EFUNC(interact_menu,createAction), + [], + _unit + ]; }; false } count crew _vehicle; From 0a226b5ee9f317c5c89f76bb29ef9dd5776cbc70 Mon Sep 17 00:00:00 2001 From: Ivan Krouglyi Date: Sat, 13 Feb 2016 03:29:42 +0300 Subject: [PATCH 53/64] Update fnc_treatment_success.sqf Error at 84 line - you forget ";" --- addons/medical/functions/fnc_treatment_success.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index 55ddfa394e..81c3a588ba 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -81,7 +81,7 @@ if ((GVAR(level) >= 2) && {([_target] call FUNC(hasMedicalEnabled))}) then { } else { //Basic Medical (just use blodyPartStatus): private _damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; - _bloodLossOnSelection = _damageBodyParts select _partNumber + _bloodLossOnSelection = _damageBodyParts select _partNumber; TRACE_1("basic",_bloodLossOnSelection); }; From e2ed38609d71b9f1caff0613c7d0e521a1f51b4e Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 13 Feb 2016 15:04:43 -0300 Subject: [PATCH 54/64] Replace driver by effectivCommander on EFUNC(common,getGunner) and EFUNC(common,firedEH) --- addons/common/functions/fnc_firedEH.sqf | 2 +- addons/common/functions/fnc_getGunner.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index c11f6d990f..d70f0a8650 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -51,7 +51,7 @@ if (_unit isKindOf "CAManBase") then { } count allTurrets [_unit, true]; // Ensure that at least the pilot is returned if there is no gunner if (isManualFire _unit && {isNull _gunner}) then { - _gunner = driver _unit; + _gunner = effectiveCommander _unit; }; if (_gunner == ACE_player) then { diff --git a/addons/common/functions/fnc_getGunner.sqf b/addons/common/functions/fnc_getGunner.sqf index fb8c19ce45..c11f2882ca 100644 --- a/addons/common/functions/fnc_getGunner.sqf +++ b/addons/common/functions/fnc_getGunner.sqf @@ -30,7 +30,7 @@ private _gunner = objNull; // ensure that at least the pilot is returned if there is no gunner if (isManualFire _vehicle && {isNull _gunner}) then { - _gunner = driver _vehicle; + _gunner = effectiveCommander _vehicle; }; _gunner From 4a8b032c1fab8321fad12504d412f59c7dbaeeec Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 14 Feb 2016 14:53:04 -0600 Subject: [PATCH 55/64] Don't allow passing mags when not in same veh --- addons/interaction/functions/fnc_canPassMagazine.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/interaction/functions/fnc_canPassMagazine.sqf b/addons/interaction/functions/fnc_canPassMagazine.sqf index 1c1dd1bb2d..66c560c271 100644 --- a/addons/interaction/functions/fnc_canPassMagazine.sqf +++ b/addons/interaction/functions/fnc_canPassMagazine.sqf @@ -18,11 +18,11 @@ #include "script_component.hpp" params ["_player", "_target", "_weapon"]; -private ["_compatibleMags"]; if (!GVAR(enableMagazinePassing)) exitWith {false}; +if (((vehicle _target) != _target) && {(vehicle _target) != (vehicle _player)}) exitWith {false}; -_compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines"); +private _compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines"); { _x params ["_className", "", "_loaded"]; if ((_className in _compatibleMags) && {!_loaded} && {_target canAdd _className}) exitWith {true}; From 9441b548be201cce08a48470f16bef609ccd5db6 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 15 Feb 2016 17:11:04 -0600 Subject: [PATCH 56/64] Fix vehicle crashes not being fatal to non-drivers Fix #3306 --- addons/medical/functions/fnc_handleDamage.sqf | 6 ++++-- addons/medical/functions/fnc_handleDamage_caching.sqf | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 628c1cb92e..e993dd181b 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -77,9 +77,11 @@ _minLethalDamage = if (_typeIndex >= 0) then { 0.01 }; -if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _shooter} && {_projectile == ""} && {_selection == ""}) then { +private _vehicle = vehicle _unit; +if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_shooter in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selection == ""}) then { if (GVAR(enableVehicleCrashes)) then { - _selection = GVAR(SELECTIONS) select (floor(random(count GVAR(SELECTIONS)))); + _selection = _this select 1; //pull random selection from HDC + TRACE_1("Veh Crash",_selection); }; }; diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 1eae9544ad..155e7dc687 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -29,9 +29,11 @@ if (_hitPointIndex >= 0) then {_newDamage = _damage - (_unit getHitIndex _hitPoi TRACE_7("ACE_DEBUG: HandleDamage_Caching Called",_unit, _selectionName, _damage, _source, _projectile,_hitPointIndex,_newDamage); // Check for vehicle crash -if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _source} && {_projectile == ""} && {_selectionName == ""}) then { +private _vehicle = vehicle _unit; +if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_source in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selectionName == ""}) then { if (GVAR(enableVehicleCrashes)) then { _selectionName = _hitSelections select (floor(random(count _hitSelections))); + TRACE_1("Veh Crash",_selectionName); _projectile = "vehiclecrash"; _this set [1, _selectionName]; _this set [4, _projectile]; @@ -40,7 +42,7 @@ if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isN // Handle falling damage _impactVelocity = (velocity _unit) select 2; -if (_impactVelocity < -5 && {vehicle _unit == _unit}) then { +if (_impactVelocity < -5 && {_vehicle == _unit}) then { TRACE_1("Starting isFalling", time); _unit setVariable [QGVAR(isFalling), true]; _unit setVariable [QGVAR(impactVelocity), _impactVelocity]; From 5c9dfd7dc5cb0405f88b5d4d7a5992c0331c7d09 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 15 Feb 2016 22:23:04 -0600 Subject: [PATCH 57/64] Handle enemy causing veh explode, fix revive unload Fix #3269 --- .../functions/fnc_determineIfFatal.sqf | 2 +- addons/medical/functions/fnc_handleDamage.sqf | 19 ++++++++----------- .../functions/fnc_handleDamage_caching.sqf | 1 - addons/medical/functions/fnc_setDead.sqf | 6 ++++++ 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 8be0e00903..8a70d336c2 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -26,8 +26,8 @@ private ["_damageThreshold", "_damageBodyPart", "_chanceFatal"]; params ["_unit", "_part", ["_withDamage", 0]]; if (!alive _unit) exitWith {true}; -if (_part < 0 || _part > 5) exitWith {false}; if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true }; +if (_part < 0 || _part > 5) exitWith {false}; // Find the correct Damage threshold for unit. _damageThreshold = [1,1,1]; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index e993dd181b..cf67d2add9 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -26,6 +26,8 @@ if !(local _unit) exitWith { nil }; +// if (alive _unit) then {diag_log text format ["HD: %1", _this];}; + private ["_damageReturn", "_typeOfDamage", "_minLethalDamage", "_newDamage", "_typeIndex", "_preventDeath"]; // bug, assumed fixed, @todo excessive testing, if nothing happens remove @@ -78,14 +80,14 @@ _minLethalDamage = if (_typeIndex >= 0) then { }; private _vehicle = vehicle _unit; +private _effectiveSelectionName = _selection; if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_shooter in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selection == ""}) then { if (GVAR(enableVehicleCrashes)) then { - _selection = _this select 1; //pull random selection from HDC - TRACE_1("Veh Crash",_selection); + _effectiveSelectionName = _this select 1; //pull random selection from HDC }; }; -if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then { +if ((_minLethalDamage <= _newDamage) && {[_unit, [_effectiveSelectionName] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then { if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitwith { _damageReturn = 0.9; }; @@ -101,13 +103,8 @@ if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectio [_unit] call FUNC(addToInjuredCollection); if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith { - if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then { - [_unit] call EFUNC(common,unloadPerson); - }; - - private "_delayedUnconsicous"; - _delayedUnconsicous = false; - if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then { + private _delayedUnconsicous = false; + if (_vehicle != _unit and {damage _vehicle >= 1}) then { [_unit] call EFUNC(common,unloadPerson); _delayedUnconsicous = true; }; @@ -120,7 +117,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW if (_delayedUnconsicous) then { [{ [_this select 0, true] call FUNC(setUnconscious); - }, [_unit], 0.7, 0] call EFUNC(common,waitAndExecute); + }, [_unit], 0.7] call EFUNC(common,waitAndExecute); } else { [{ [_this select 0, true] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 155e7dc687..e834ec272f 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -33,7 +33,6 @@ private _vehicle = vehicle _unit; if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_source in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selectionName == ""}) then { if (GVAR(enableVehicleCrashes)) then { _selectionName = _hitSelections select (floor(random(count _hitSelections))); - TRACE_1("Veh Crash",_selectionName); _projectile = "vehiclecrash"; _this set [1, _selectionName]; _this set [4, _projectile]; diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 030945daaf..7c4f94b260 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -47,6 +47,12 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == _args params ["_unit"]; _startTime = _unit getVariable [QGVAR(reviveStartTime), 0]; + //If we are in reivie state in a blown up vehicle, try to unload so that people can access the body + if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then { + TRACE_2("Unloading", _unit, vehicle _unit); + [_unit] call EFUNC(common,unloadPerson); + }; + if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setVariable [QGVAR(inReviveState), nil, true]; From dacb5e1748d071b2b2e9f1d07cae6a3e0c181b8c Mon Sep 17 00:00:00 2001 From: bux578 Date: Tue, 16 Feb 2016 13:14:28 +0100 Subject: [PATCH 58/64] add --ci switch to make.py to signal the end of the process to an automated build --- tools/make.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/make.py b/tools/make.py index da14ea026e..44e2c80de3 100644 --- a/tools/make.py +++ b/tools/make.py @@ -1432,4 +1432,8 @@ if __name__ == "__main__": main(sys.argv) d,h,m,s = Fract_Sec(timeit.default_timer() - start_time) print("\nTotal Program time elapsed: {0:2}h {1:2}m {2:4.5f}s".format(h,m,s)) + + if "--ci" in sys.argv: + sys.exit(0) + input("Press Enter to continue...") From 245a9d43d1cda46e0c5902da8a771f02d5c38990 Mon Sep 17 00:00:00 2001 From: bux578 Date: Tue, 16 Feb 2016 13:26:47 +0100 Subject: [PATCH 59/64] fix - args being recognized as modules --- tools/make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make.py b/tools/make.py index 44e2c80de3..ab2d33d514 100644 --- a/tools/make.py +++ b/tools/make.py @@ -949,7 +949,7 @@ See the make.cfg file for additional build options. # See if we have been given specific modules to build from command line. if len(argv) > 1 and not make_release_zip: arg_modules = True - modules = argv[1:] + modules = [a for a in argv[1:] if a[0] != "-"] # Find the tools we need. try: From 8ec70632068195cca3341552c4810555737d1a95 Mon Sep 17 00:00:00 2001 From: bux578 Date: Tue, 16 Feb 2016 13:44:43 +0100 Subject: [PATCH 60/64] add proper exit code when build is failing --- tools/make.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/make.py b/tools/make.py index ab2d33d514..92ab4f02e6 100644 --- a/tools/make.py +++ b/tools/make.py @@ -1424,6 +1424,7 @@ See the make.cfg file for additional build options. for failedModuleName in namesOfBuildsFailed: print("- {} failed.".format(failedModuleName)) + sys.exit(1) else: print_green("\Completed with 0 errors.") From 067f88ff428d956486d77167f16bd5597de63363 Mon Sep 17 00:00:00 2001 From: bux578 Date: Tue, 16 Feb 2016 15:46:10 +0100 Subject: [PATCH 61/64] change make.py to accept --ci arg --- tools/make.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/make.py b/tools/make.py index 92ab4f02e6..ed18085ef0 100644 --- a/tools/make.py +++ b/tools/make.py @@ -76,6 +76,8 @@ signature_blacklist = ["ace_server.pbo"] importantFiles = ["mod.cpp", "README.md", "docs\\README_DE.md", "docs\\README_PL.md", "AUTHORS.txt", "LICENSE", "logo_ace3_ca.paa"] versionFiles = ["README.md", "docs\\README_DE.md", "docs\\README_PL.md", "mod.cpp"] +ciBuild = False # Used for CI builds + ############################################################################### # http://akiscode.com/articles/sha-1directoryhash.shtml # Copyright (c) 2009 Stephen Akiki @@ -757,6 +759,7 @@ def main(argv): global dssignfile global prefix global pbo_name_prefix + global ciBuild if sys.platform != "win32": print_error("Non-Windows platform (Cygwin?). Please re-run from cmd.") @@ -860,6 +863,10 @@ See the make.cfg file for additional build options. else: version_update = False + if "--ci" in argv: + argv.remove("--ci") + ciBuild = True + print_yellow("\nCheck external references is set to {}".format(str(check_external))) # Get the directory the make script is in. @@ -1434,7 +1441,7 @@ if __name__ == "__main__": d,h,m,s = Fract_Sec(timeit.default_timer() - start_time) print("\nTotal Program time elapsed: {0:2}h {1:2}m {2:4.5f}s".format(h,m,s)) - if "--ci" in sys.argv: + if ciBuild: sys.exit(0) input("Press Enter to continue...") From 1bc73af1c94b79716f39aa24ef305acd9174abec Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 16 Feb 2016 16:11:18 +0100 Subject: [PATCH 62/64] remove ace fake weapon from 3den cargo editor --- addons/common/CfgWeapons.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/CfgWeapons.hpp b/addons/common/CfgWeapons.hpp index aa905bb3e6..22075e2903 100644 --- a/addons/common/CfgWeapons.hpp +++ b/addons/common/CfgWeapons.hpp @@ -13,7 +13,7 @@ class CfgWeapons { }; class ACE_FakePrimaryWeapon: Rifle_Base_F { - scope = 2; + scope = 1; scopeCurator = 1; scopeArsenal = 1; displayName = ""; From f1797feead35a091875161c72067eed4393aa4c0 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 16 Feb 2016 12:19:18 -0600 Subject: [PATCH 63/64] Make wound assignment consistent for dll/sqf Dll now exits on first match for threshold damage (exitWith) Remove random wound in sqf to match dll Fix backblast threshold order Add lower vehiclecrash threshold Add dll version logging --- ace_medical.dll | Bin 223744 -> 224768 bytes addons/medical/ACE_Medical_Treatments.hpp | 4 ++-- addons/medical/XEH_preInit.sqf | 9 ++++++++- .../functions/fnc_handleDamage_wounds.sqf | 2 +- .../functions/fnc_handleDamage_woundsOld.sqf | 2 +- extensions/CMakeLists.txt | 4 ++-- extensions/medical/handleDamage.cpp | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ace_medical.dll b/ace_medical.dll index c54febf34f8e4d90c3dd8a704e4a638b888855ec..3b5e97ca198f1aca516900b7d8c274cea64c525c 100644 GIT binary patch delta 41530 zcmagG30&00|3AL-W`RWz7Uc%H5fD)j4-^kjSMfj>4-oG>5j8JXtt70KbX_;K(Z)(m z(^6AY^8l3;L;>@{G{vJlvK+(=kBrLP-*eu(i`u8}|F4gIzh_?an%BJMHLrQiYhE*N z7G7+;@OtAFor%xNEhV&%r;G@Cvua#vetp9E*q!4G~s!)uR6bcU_LtSV*i6T{WIBD*s?qa7H z1n303JB!j4c8YA}%8;hY4R(r)bSD`h?HEfNNzEH6kE3)UsFc%AQcQYFJAvKsFIk}| zX*GG$lnHY{LNqfI<+{U5yKR=LxFrBFDD$3iP!GJRhPibv}T2SB_3N3Gctr_C6z zP+W{aIha#4$2*n&DBb%&*+Sacn6^~*mNqx0I%SA-yfIy)d`i~Q<@U#irMM7<{&>J> zkG7%CZ-Uw9=A(U!?1g$?!EIeP2!=%pQlD*LI@j zX99ZZ7~Sr0f^?>{9Q|B&?NBIA4>jJ;F=vn1%N&;HO+cv|Kz&#iLj}3SDWUYYu5dH@UWHTJSl#X!&R9Xz^IeU5%vU-dwjb z(xh`6JGDu3yh3xl?p;Z(wd7ZtmVA zO=^g{g-B(ErqV)W3N7*o%&_qLSfdq(BKXJ)Xpo)IsG+-A_xEZ z{c_sgD_#2GD{AnHcTI305T`|wbEogE^ztL^?tLwflfKJMD5+T&lRXxSR$*U_+-?Z9 z!u~o^_Cg?Y_JCP|#ph9PpCFP6+7rOpZtKgp^WkVGg{6zmi_|{Yv`e7!3~dq;=z!bc0_XQnvS=UuPnnevL*2 zq?0iEX26MnA4Wnrj(f?HQNJ0J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gs?BYTDNqZ$6_bxl0Rz3zl&cNr7+>4m9-4Uqe6yHPmLHq?%5RxvF zK2*mV{mj=9U!QY6BJ0Q552Ai7!3(%&xySiRo)dav#XKwiDc&zVES-@Wqybofzm}g@ zmZ(S6eTXxz)r<5;^>Y1$UWz;Ylp&c8cB(%@Qv|kV8rq z7T?}Ro^hK|U^85ZDFRIex0Tz@?c%~PHjN*~=ks^*Gx@pvWZ@CvG2v-(y?7fUs~u9c z^tJQ{qN*%x`L2^k$= z*iB@lm1W;&&$b`67a?NaYQJY^z?=7ThB{*q^Hw^i5YD#3s@}&nu>TD)3(-M`yAvDt zTCNG-fzO0Ss`;<@ll*D^H(tdie!j3ocmZ~_U$`J7iDSe`n5+lIGHl}|=>=(n^oev- zYAbJ)Ka?|+TO!I7^!0xAD^-C@`2cHooZeJV)H~~$`oDBeUj}Eq9_!RMn9IA&C(PHa zPpz5u>rR8qUW|JeUq@B`U=>X0?j$<$lQi_}|_rjEGIAX|=bLA;=v0MVDP$n;z%jI?QUipB0 zSUxVF#(*!#Nr>&UU>Fuc&>_lb?Bq(|Hp`UdFq5@P1$O#};Yv;;B)x#(KCE)8re>=- zaI2%?UKXm$BWk(24Tk`G)w61fmZ@cFL$pF|mNr*gfqARYYP8dc@God7db+OZ*?NvX zLZ5{@a2$URTK%cgc5kD1-^Z(#a?2k zu=kR6ToB^L6fs@wC33Kkd~pG6dIf$O3j?VZkBX+f0HIzGO4mzSZR6 zRxO0(%!>HNvqGs-4!~d-n92y4NfDxu<*<n^_s@+{Xf?Zh2;PM diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 51fb4ca701..ed6a0a8257 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -651,12 +651,12 @@ class ACE_Medical_Advanced { selectionSpecific = 0; }; class vehiclecrash { - thresholds[] = {{0.25, 5}}; + thresholds[] = {{0.25, 5}, {0.05, 1}}; selectionSpecific = 0; lethalDamage = 0.2; }; class backblast { - thresholds[] = {{0, 2},{0.55, 5}, {1, 6}}; + thresholds[] = {{1, 6}, {0.55, 5}, {0, 2}}; selectionSpecific = 0; lethalDamage = 1; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 189d6b207d..769e24b7a4 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -118,7 +118,14 @@ PREP(handleCreateLitter); GVAR(injuredUnitCollection) = []; GVAR(IVBags) = []; -DFUNC(handleDamage_assignWounds) = if ("ace_medical" callExtension "version" == "") then { DFUNC(handleDamage_woundsOld) } else { DFUNC(handleDamage_wounds)}; +private _versionEx = "ace_medical" callExtension "version"; +DFUNC(handleDamage_assignWounds) = if (_versionEx == "") then { + ACE_LOGINFO_1("Extension %1.dll not installed.","ace_medical"); + DFUNC(handleDamage_woundsOld) +} else { + ACE_LOGINFO_2("Extension version: %1: %2","ace_medical",_versionEx); + DFUNC(handleDamage_wounds) +}; call FUNC(parseConfigForInjuries); diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 38665a0e40..14c74df11a 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -31,8 +31,8 @@ _painToAdd = 0; _woundsCreated = []; call compile _extensionOutput; -_foundIndex = -1; { + _foundIndex = -1; _toAddClassID = _x select 1; _bodyPartNToAdd = _x select 2; { diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index 4384dce2d7..24cc8ac693 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -80,7 +80,7 @@ _painToAdd = 0; _woundsCreated = []; { if (_x select 0 <= _damage) exitWith { - for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do { + for "_i" from 0 to ((_x select 1)-1) do { // Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage] _toAddInjury = if (random(1) >= 0.85) then {_allInjuriesForDamageType select _highestPossibleSpot} else {_allPossibleInjuries select (floor(random (count _allPossibleInjuries)));}; diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index c152ce1e21..db4c94242b 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -89,8 +89,8 @@ endif() string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ") set(ACE_VERSION_MAJOR 3) -set(ACE_VERSION_MINOR 4) -set(ACE_VERSION_REVISION 1) +set(ACE_VERSION_MINOR 5) +set(ACE_VERSION_REVISION 0) EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD OUTPUT_VARIABLE T_ACE_VERSION_BUILD OUTPUT_STRIP_TRAILING_WHITESPACE diff --git a/extensions/medical/handleDamage.cpp b/extensions/medical/handleDamage.cpp index e36d8994b0..2a50ba4ee6 100644 --- a/extensions/medical/handleDamage.cpp +++ b/extensions/medical/handleDamage.cpp @@ -109,10 +109,10 @@ namespace ace { injuries::OpenWound newWound(woundID++, injuryToAdd->ID, bodyPartID, 1, injuryToAdd->bloodLoss, injuryToAdd->pain); injuriesToAdd.push_back(newWound); } + return injuriesToAdd; } ++c; } - return injuriesToAdd; } } return injuriesToAdd; From 40396fc69eff4238226be8e5a83e215c04420105 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 17 Feb 2016 09:37:08 -0600 Subject: [PATCH 64/64] Remove debug --- addons/medical/functions/fnc_handleDamage.sqf | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index cf67d2add9..a5ce32b9e0 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -26,8 +26,6 @@ if !(local _unit) exitWith { nil }; -// if (alive _unit) then {diag_log text format ["HD: %1", _this];}; - private ["_damageReturn", "_typeOfDamage", "_minLethalDamage", "_newDamage", "_typeIndex", "_preventDeath"]; // bug, assumed fixed, @todo excessive testing, if nothing happens remove