From 21c927195a83913e9838f70c0f729166d2c935ff Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 20 Apr 2020 10:45:27 -0500 Subject: [PATCH] Cargo - Re-enable damage on unloaded tanks (#7655) --- addons/cargo/XEH_postInit.sqf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 1df7733aea..decaf1637c 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -51,8 +51,9 @@ _item hideObjectGlobal false; _item setPosASL (AGLtoASL _emptyPosAGL); - if ((getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "carx") then { - TRACE_1("re-enabling car damage",_item); + private _simulationType = toLower getText (configFile >> "CfgVehicles" >> typeOf _item >> "simulation"); + if (_simulationType in ["carx", "tankx"]) then { + TRACE_1("re-enabling vehicle damage",_item); [_item, "blockDamage", "ACE_cargo", false] call EFUNC(common,statusEffect_set); }; }] call CBA_fnc_addEventHandler;