Skip to content

Commit

Permalink
Dragging - Add compatibilty for 1.84 static weapons and radars (#6494)
Browse files Browse the repository at this point in the history
* Dragging - Add compatibilty for 1.84 static weapons and radars

* Reload - Disable check ammo keybind when in UAV
  • Loading branch information
PabstMirror authored Aug 1, 2018
1 parent 9f85a53 commit 6ae7c28
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 25 additions & 1 deletion addons/dragging/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CfgVehicles {
GVAR(dragDirection) = 0;
};

// Big 1.70 Autonomous AA Turrets
// Big 1.70 and 1.84 Autonomous AA Turrets
class StaticMGWeapon;
class AAA_System_01_base_F: StaticMGWeapon { // Praetorian 1C (aka Phalanx CIWS)
GVAR(canCarry) = 0;
Expand All @@ -44,6 +44,30 @@ class CfgVehicles {
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
class SAM_System_03_base_F: StaticMGWeapon { // MIM-145 Defender
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
class SAM_System_04_base_F: StaticMGWeapon { // S-750 Rhea
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
class B_Ship_Gun_01_base_F: StaticMGWeapon { // Mk45 Hammer
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
class B_Ship_MRLS_01_base_F: StaticMGWeapon { // Mk41 VLS
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
class Radar_System_01_base_F: StaticMGWeapon { // AN/MPQ-105 Radar
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
class Radar_System_02_base_F: StaticMGWeapon { // R-750 Cronus Radar
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};

// ammo boxes
class ThingX;
Expand Down
2 changes: 2 additions & 0 deletions addons/reload/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if (!hasInterface) exitWith {};
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(ACE_player call CBA_fnc_canUseWeapon || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
// Ignore if controlling UAV (blocks radar keybind)
if (!isNull (ACE_controlledUAV param [0, objNull])) exitWith {false};

// Statement
[ACE_player] call FUNC(checkAmmo);
Expand Down

0 comments on commit 6ae7c28

Please sign in to comment.