Cargo - Re-enable damage on unloaded tanks (#7655)

This commit is contained in:
PabstMirror 2020-04-20 10:45:27 -05:00 committed by GitHub
parent c4667c896f
commit 21c927195a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;