mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Engine - Increase lethality of aircraft explosions (#7304)
* Medical Engine - Increase lethality of aircraft explosions * Update addons/medical_engine/XEH_postInit.sqf Co-Authored-By: jonpas <jonpas33@gmail.com>
This commit is contained in:
parent
b874a1f618
commit
1fb989d332
@ -48,3 +48,17 @@
|
||||
[_unit, true] call FUNC(setUnconsciousAnim);
|
||||
};
|
||||
}] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
// Guarantee aircraft crashes are more lethal
|
||||
["Air", "Killed", {
|
||||
params ["_vehicle", "_killer"];
|
||||
TRACE_3("air killed",_vehicle,typeOf _vehicle,velocity _vehicle);
|
||||
if ((getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "destrType")) == "") exitWith {};
|
||||
if (unitIsUAV _vehicle) exitWith {};
|
||||
|
||||
private _lethality = linearConversion [0, 25, (vectorMagnitude velocity _vehicle), 0.5, 1];
|
||||
TRACE_2("air crash",_lethality,crew _vehicle);
|
||||
{
|
||||
[QEGVAR(medical,woundReceived), [_x, "Head", _lethality, _killer, "#vehiclecrash", [HITPOINT_INDEX_HEAD,1]], _x] call CBA_fnc_targetEvent;
|
||||
} forEach (crew _vehicle);
|
||||
}, true, ["ParachuteBase"]] call CBA_fnc_addClassEventHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user