Cargo - Fix tankx vehicles receiving water damage when loaded (#7636)

* Adds tankX simulation type to check for water damage fix

* Changes simulationType to variable

* Update addons/cargo/functions/fnc_loadItem.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/cargo/functions/fnc_loadItem.sqf

Co-Authored-By: Dystopian <sddex@ya.ru>

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
Co-authored-by: commy2 <commy-2@gmx.de>
Co-authored-by: Dystopian <sddex@ya.ru>
This commit is contained in:
Rutger "RedBery" Meijering 2020-04-14 06:57:11 +02:00 committed by GitHub
parent c4514b3fb3
commit b3f7de9f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,9 @@ if (_item isEqualType objNull) then {
[QEGVAR(common,hideObjectGlobal), [_item, true]] call CBA_fnc_serverEvent;
// Cars below water will take engine damage over time and eventualy become "water logged" and unfixable (because of negative z attach)
if ((getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "carx") then {
TRACE_1("disabling car damage",_item);
private _simulationType = toLower getText (configFile >> "CfgVehicles" >> typeOf _item >> "simulation");
if (_simulationType in ["carx", "tankx"]) then {
TRACE_1("disabling vehicle damage",_item);
[_item, "blockDamage", "ACE_cargo", true] call EFUNC(common,statusEffect_set);
};
};