From 0b76fb89a0bd0f8743e1d296ddeae50bca6d9cb0 Mon Sep 17 00:00:00 2001 From: "Rutger \"RedBery\" Meijering" Date: Mon, 13 Apr 2020 20:09:44 +0200 Subject: [PATCH 1/4] Adds tankX simulation type to check for water damage fix --- addons/cargo/functions/fnc_loadItem.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index 73056ef43f7..b762c4f6666 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -39,8 +39,8 @@ 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); + if ((getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "carx" || (getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "tankx") then { + TRACE_1("disabling vehicle damage",_item); [_item, "blockDamage", "ACE_cargo", true] call EFUNC(common,statusEffect_set); }; }; From f92216a28ef2e4f31d47ba07bc91381ba06e496e Mon Sep 17 00:00:00 2001 From: "Rutger \"RedBery\" Meijering" Date: Mon, 13 Apr 2020 20:36:18 +0200 Subject: [PATCH 2/4] Changes simulationType to variable --- addons/cargo/functions/fnc_loadItem.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index b762c4f6666..bbc487c90d0 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -39,7 +39,8 @@ 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" || (getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "tankx") then { + private _simulationType = getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation"); + if (_simulationType == "carx" || _simulationType == "tankx") then { TRACE_1("disabling vehicle damage",_item); [_item, "blockDamage", "ACE_cargo", true] call EFUNC(common,statusEffect_set); }; From 85836a1d014a055b304bcd0c59efdf5a33775f32 Mon Sep 17 00:00:00 2001 From: "Rutger \"RedBery\" Meijering" Date: Mon, 13 Apr 2020 20:47:04 +0200 Subject: [PATCH 3/4] Update addons/cargo/functions/fnc_loadItem.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> --- addons/cargo/functions/fnc_loadItem.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index bbc487c90d0..c7279cc2860 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -40,7 +40,7 @@ if (_item isEqualType objNull) then { // Cars below water will take engine damage over time and eventualy become "water logged" and unfixable (because of negative z attach) private _simulationType = getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation"); - if (_simulationType == "carx" || _simulationType == "tankx") then { + if (_simulationType == "carx" || {_simulationType == "tankx"}) then { TRACE_1("disabling vehicle damage",_item); [_item, "blockDamage", "ACE_cargo", true] call EFUNC(common,statusEffect_set); }; From 4e9534e3a731f92da5d50435fd6b4e6ec260d9aa Mon Sep 17 00:00:00 2001 From: commy2 Date: Tue, 14 Apr 2020 06:55:25 +0200 Subject: [PATCH 4/4] Update addons/cargo/functions/fnc_loadItem.sqf Co-Authored-By: Dystopian --- addons/cargo/functions/fnc_loadItem.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index c7279cc2860..96dcaf87f13 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -39,8 +39,8 @@ 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) - private _simulationType = getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation"); - if (_simulationType == "carx" || {_simulationType == "tankx"}) then { + 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); };