Disable damage for all cargo objects (#7946)

This commit is contained in:
BaerMitUmlaut 2020-10-10 18:58:38 +02:00 committed by GitHub
parent 56baf2bfd0
commit 4cfe26b842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View File

@ -51,11 +51,7 @@
_item hideObjectGlobal false;
_item setPosASL (AGLtoASL _emptyPosAGL);
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);
};
[_item, "blockDamage", "ACE_cargo", false] call EFUNC(common,statusEffect_set);
}] call CBA_fnc_addEventHandler;
// Private events to handle adding actions globally via public functions

View File

@ -37,13 +37,9 @@ if (_item isEqualType objNull) then {
detach _item;
_item attachTo [_vehicle,[0,0,-100]];
[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 = 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);
};
// Some objects below water will take damage over time and eventualy become "water logged" and unfixable (because of negative z attach)
[_item, "blockDamage", "ACE_cargo", true] call EFUNC(common,statusEffect_set);
};
true