diff --git a/addons/barrelbombs/CfgVehicles.hpp b/addons/barrelbombs/CfgVehicles.hpp index f7612e5..92b096e 100644 --- a/addons/barrelbombs/CfgVehicles.hpp +++ b/addons/barrelbombs/CfgVehicles.hpp @@ -22,9 +22,11 @@ class CfgVehicles { displayName = CSTRING(Object_Dispenser_01); scope = 2; - vehicleClass = "Ammo"; + scopeCurator = 2; + vehicleClass = "Supplies"; GVAR(limitExplosives) = 3000; GVAR(limitClusters) = 200; + GVAR(dispenserBarrel) = CLASSNAME_DEFAULTBARREL; class EventHandlers { init = QUOTE(_this call FUNC(initializeDispenserMaterials)); @@ -47,8 +49,8 @@ class CfgVehicles { statement = QUOTE([ARR_2(_target,_player)] call FUNC(openBombPrepMenu)); }; }; - }; - }; + }; + }; }; diff --git a/addons/barrelbombs/config.cpp b/addons/barrelbombs/config.cpp index 78618dc..a599618 100644 --- a/addons/barrelbombs/config.cpp +++ b/addons/barrelbombs/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; + units[] = {"ACE_BarrelBomb_Dispenser_01"}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common", "ace_interaction", "ace_interact_menu", "Extended_EventHandlers"}; diff --git a/addons/barrelbombs/functions/fnc_createBarrelBomb.sqf b/addons/barrelbombs/functions/fnc_createBarrelBomb.sqf index fdbb6ce..339de86 100644 --- a/addons/barrelbombs/functions/fnc_createBarrelBomb.sqf +++ b/addons/barrelbombs/functions/fnc_createBarrelBomb.sqf @@ -3,10 +3,11 @@ params ["_dropperObject", "_barrelClass", "_explosiveType", ["_fuseTime", 99], ["_clusterAmount", 0]]; TRACE_5("CreatedBarrel",_dropperObject,_barrelClass,_explosiveType,_fuseTime,_clusterAmount); -private _delayTime = 0.5; private _dropperVelocity = velocity _dropperObject; private _dropperObjectPos = getPosATL _dropperObject; +_dropperObjectPos set [2, (_dropperObjectPos select 2) - DISTANCE_CREATEBARREL_LOWER_Z]; + private _barrelObject = _barrelClass createVehicle _dropperObjectPos; [_barrelObject] call FUNC(addDetailsToBarrel); @@ -33,4 +34,4 @@ _barrelObject setVelocity _dropperVelocity; else { [_explosiveType, _endPosition] call FUNC(createExplosion) }; }, [_barrelObject, _explosiveType, _fuseTriggerTime, _fuseTime, _clusterAmount]] call CBA_fnc_waitUntilAndExecute; -}, [_barrelObject, _explosiveType, _fuseTime, _clusterAmount], _delayTime] call CBA_fnc_waitAndExecute; +}, [_barrelObject, _explosiveType, _fuseTime, _clusterAmount], DURATION_BARREL_ACTIVATION_MIN] call CBA_fnc_waitAndExecute; diff --git a/addons/barrelbombs/functions/fnc_getBarrelTypeFromDispenser.sqf b/addons/barrelbombs/functions/fnc_getBarrelTypeFromDispenser.sqf index 93d5d61..43df06b 100644 --- a/addons/barrelbombs/functions/fnc_getBarrelTypeFromDispenser.sqf +++ b/addons/barrelbombs/functions/fnc_getBarrelTypeFromDispenser.sqf @@ -3,8 +3,6 @@ params ["_dispenserObject"]; TRACE_1("Params",_dispenserObject); -private _returnValue = switch (typeOf _dispenserObject) do { - case QGVAR(Dispenser_01): { CLASSNAME_DEFAULTBARREL }; - default { CLASSNAME_DEFAULTBARREL }; -}; -_returnValue +private _dispenserBarrel = getText(configFile >> "CfgVehicles" >> (typeOf _dispenserObject) >> QGVAR(dispenserBarrel)); + +_dispenserBarrel diff --git a/addons/barrelbombs/numbers.hpp b/addons/barrelbombs/numbers.hpp index 08fe418..25bdde9 100644 --- a/addons/barrelbombs/numbers.hpp +++ b/addons/barrelbombs/numbers.hpp @@ -46,6 +46,8 @@ #define DISTANCE_DEVIATION_CREATEBARREL_X 2 +#define DISTANCE_CREATEBARREL_LOWER_Z 2.5 + // VOLUME ------------- #define VOLUME_BOMBMAKING_DISTANCE_METERS 20 @@ -59,6 +61,8 @@ #define DURATION_BOMBMAKING_SECONDS 12 #define DURATION_LOADINGBARREL_SECONDS 3.5 +#define DURATION_BARREL_ACTIVATION_MIN 0.5 + // INTERVALS ------------- #define INTERVAL_FALLINGSOUND_START_SECONDS 2 diff --git a/mod.cpp b/mod.cpp index 375e1bb..ca2acca 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,5 +1,5 @@ name = "ACE Barrel Bombs"; -description = "ACE Barrel Bombs - Version 1.0.1"; +description = "ACE Barrel Bombs - Version 1.0.5"; author = "Nife"; picture = "data\picture.paa"; logo = "data\logo.paa";