mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Add Vehicle Crashes setting (#8149)
Co-authored-by: jonpas <jonpas33@gmail.com>
This commit is contained in:
@ -42,3 +42,12 @@
|
|||||||
[0, 1, 1, 2, true],
|
[0, 1, 1, 2, true],
|
||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QEGVAR(medical,enableVehicleCrashes),
|
||||||
|
"CHECKBOX",
|
||||||
|
[LSTRING(EnableVehicleCrashes_DisplayName), LSTRING(EnableVehicleCrashes_Description)],
|
||||||
|
ELSTRING(medical,Category),
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
@ -703,5 +703,11 @@
|
|||||||
<Key ID="STR_ACE_Medical_Damage_DeathChance_Description">
|
<Key ID="STR_ACE_Medical_Damage_DeathChance_Description">
|
||||||
<English>The chance of dying to a fatal injury.</English>
|
<English>The chance of dying to a fatal injury.</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Damage_EnableVehicleCrashes_DisplayName">
|
||||||
|
<English>Enable Vehicle Crash Damage</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Damage_EnableVehicleCrashes_Description">
|
||||||
|
<English>Controls whether crew receives damage from vehicle collisions.</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -94,7 +94,7 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith {
|
|||||||
|
|
||||||
// represents all incoming damage for selecting a non-selectionSpecific wound location, (used for selectRandomWeighted [value1,weight1,value2....])
|
// represents all incoming damage for selecting a non-selectionSpecific wound location, (used for selectRandomWeighted [value1,weight1,value2....])
|
||||||
private _damageSelectionArray = [
|
private _damageSelectionArray = [
|
||||||
HITPOINT_INDEX_HEAD, _damageHead select 1, HITPOINT_INDEX_BODY, _damageBody select 1, HITPOINT_INDEX_LARM, _damageLeftArm select 1,
|
HITPOINT_INDEX_HEAD, _damageHead select 1, HITPOINT_INDEX_BODY, _damageBody select 1, HITPOINT_INDEX_LARM, _damageLeftArm select 1,
|
||||||
HITPOINT_INDEX_RARM, _damageRightArm select 1, HITPOINT_INDEX_LLEG, _damageLeftLeg select 1, HITPOINT_INDEX_RLEG, _damageRightLeg select 1
|
HITPOINT_INDEX_RARM, _damageRightArm select 1, HITPOINT_INDEX_LLEG, _damageLeftLeg select 1, HITPOINT_INDEX_RLEG, _damageRightLeg select 1
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -204,14 +204,15 @@ if (
|
|||||||
// It does fire the EH multiple times, but this seems to scale with the intensity of the crash
|
// It does fire the EH multiple times, but this seems to scale with the intensity of the crash
|
||||||
private _vehicle = vehicle _unit;
|
private _vehicle = vehicle _unit;
|
||||||
if (
|
if (
|
||||||
_hitPoint isEqualTo "#structural" &&
|
EGVAR(medical,enableVehicleCrashes) &&
|
||||||
|
{_hitPoint isEqualTo "#structural"} &&
|
||||||
{_ammo isEqualTo ""} &&
|
{_ammo isEqualTo ""} &&
|
||||||
{_vehicle != _unit} &&
|
{_vehicle != _unit} &&
|
||||||
{vectorMagnitude (velocity _vehicle) > 5}
|
{vectorMagnitude (velocity _vehicle) > 5}
|
||||||
// todo: no way to detect if stationary and another vehicle hits you
|
// todo: no way to detect if stationary and another vehicle hits you
|
||||||
) exitWith {
|
) exitWith {
|
||||||
private _damageSelectionArray = [
|
private _damageSelectionArray = [
|
||||||
HITPOINT_INDEX_HEAD, 1, HITPOINT_INDEX_BODY, 1, HITPOINT_INDEX_LARM, 1,
|
HITPOINT_INDEX_HEAD, 1, HITPOINT_INDEX_BODY, 1, HITPOINT_INDEX_LARM, 1,
|
||||||
HITPOINT_INDEX_RARM, 1, HITPOINT_INDEX_LLEG, 1, HITPOINT_INDEX_RLEG, 1
|
HITPOINT_INDEX_RARM, 1, HITPOINT_INDEX_LLEG, 1, HITPOINT_INDEX_RLEG, 1
|
||||||
];
|
];
|
||||||
[QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "vehiclecrash", _damageSelectionArray]] call CBA_fnc_localEvent;
|
[QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "vehiclecrash", _damageSelectionArray]] call CBA_fnc_localEvent;
|
||||||
|
Reference in New Issue
Block a user