Skip to content

Commit

Permalink
Disable cook-off for some drones
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Jan 12, 2025
1 parent d69f047 commit 1945641
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 23 deletions.
2 changes: 1 addition & 1 deletion addons/compat_sog/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Extended_InitPost_EventHandlers {
};
class vn_bicycle_base {
class ADDON {
init = QUOTE(call FUNC(disableCookoff));
init = QUOTE(call EFUNC(cookoff,disableCookoff));
};
};
};
1 change: 0 additions & 1 deletion addons/compat_sog/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
PREP(disableCookoff);
PREP(handleBikeMinePlace);
PREP(handlePunjiTrapDamage);
PREP(handlePunjiTrapPlace);
Expand Down
21 changes: 0 additions & 21 deletions addons/compat_sog/functions/fnc_disableCookoff.sqf

This file was deleted.

13 changes: 13 additions & 0 deletions addons/compat_ws/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Extended_InitPost_EventHandlers {
class UAV_02_Base_lxWS {
class ADDON {
init = QUOTE(call EFUNC(cookoff,disableCookoff));
};
};

class UAV_02_IED_Base_lxWS {
class ADDON {
init = ""; // Enable cook-off for IED drone
};
};
};
1 change: 1 addition & 0 deletions addons/compat_ws/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ class CfgPatches {
};
};

#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
14 changes: 14 additions & 0 deletions addons/cookoff/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,17 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

class Extended_InitPost_EventHandlers {
class UGV_02_Demining_Base_F {
class ADDON {
init = QUOTE(call FUNC(disableCookoff));
};
};

class UGV_02_Science_Base_F {
class ADDON {
init = QUOTE(call FUNC(disableCookoff));
};
};
};
1 change: 1 addition & 0 deletions addons/cookoff/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PREP(cookOffLocal);
PREP(cookOffServer);
PREP(detonateAmmunitionServer);
PREP(detonateAmmunitionServerLoop);
PREP(disableCookoff);
PREP(engineFireLocal);
PREP(engineFireServer);
PREP(getVehicleAmmo);
Expand Down
21 changes: 21 additions & 0 deletions addons/cookoff/functions/fnc_disableCookoff.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Disables cookoff for objects. Use in init fields.
*
* Arguments:
* 0: Object <OBJECT>
*
* Return Value:
* None
*
* Example:
* cursorObject call ace_cookoff_fnc_disableCookoff
*
* Public: No
*/

params ["_object"];

_object setVariable [QGVAR(enable), false];
_object setVariable [QGVAR(enableAmmoCookoff), false];

0 comments on commit 1945641

Please sign in to comment.