mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disable damage for all cargo objects (#7946)
This commit is contained in:
parent
56baf2bfd0
commit
4cfe26b842
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user