mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disable damage on cars loaded as cargo (#5402)
This commit is contained in:
parent
e7ebbd5750
commit
a67815d072
@ -50,6 +50,11 @@
|
||||
|
||||
_item hideObjectGlobal false;
|
||||
_item setPosASL (AGLtoASL _emptyPosAGL);
|
||||
|
||||
if ((getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "carx") then {
|
||||
TRACE_1("re-enabling car damage",_item);
|
||||
[_item, "blockDamage", "ACE_cargo", false] call EFUNC(common,statusEffect_set);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Private events to handle adding actions globally via public functions
|
||||
|
@ -36,6 +36,12 @@ 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)
|
||||
if ((getText (configFile >> "CfgVehicles" >> (typeOf _item) >> "simulation")) == "carx") then {
|
||||
TRACE_1("disabling car damage",_item);
|
||||
[_item, "blockDamage", "ACE_cargo", true] call EFUNC(common,statusEffect_set);
|
||||
};
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -22,7 +22,7 @@
|
||||
["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType);
|
||||
["blockSprint", false, []] call FUNC(statusEffect_addType);
|
||||
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
|
||||
["blockDamage", false, ["fixCollision", "ACE_cargo"]] call FUNC(statusEffect_addType);
|
||||
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
|
||||
|
||||
[QGVAR(forceWalk), {
|
||||
|
Loading…
Reference in New Issue
Block a user