mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Improved comments
This commit is contained in:
parent
3f0909ddd5
commit
cc70580a93
@ -81,12 +81,10 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
_hitpointGroupConfig = configFile >> "CfgVehicles" >> _type >> QGVAR(hitpointGroups);
|
||||
_inHitpointSubGroup = false;
|
||||
if (isArray _hitpointGroupConfig) then {
|
||||
// Loop through hitpoint groups
|
||||
// Set variable if current hitpoint is in a sub-group (to be excluded from adding action)
|
||||
_currentHitpoint = _x;
|
||||
{
|
||||
// Loop through sub-group
|
||||
{
|
||||
// Current hitpoint is in a sub-group, set it so
|
||||
if (_x == _currentHitpoint) exitWith {
|
||||
_inHitpointSubGroup = true;
|
||||
};
|
||||
@ -94,7 +92,7 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
} forEach (getArray _hitpointGroupConfig);
|
||||
};
|
||||
|
||||
// Exit if current hitpoint is not a group leader (only they get actions)
|
||||
// Exit if current hitpoint is in sub-group (only main hitpoints get actions)
|
||||
if (_inHitpointSubGroup) exitWith {};
|
||||
|
||||
// exit if the hitpoint is virtual
|
||||
|
@ -24,7 +24,7 @@ params ["_caller", "_target", "_hitPoint"];
|
||||
_hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups);
|
||||
_hitpointGroup = [];
|
||||
if (isArray _hitpointGroupConfig) then {
|
||||
// Loop through hitpoint groups
|
||||
// Retrieve hitpoint subgroup if current hitpoint is main hitpoint of a group
|
||||
{
|
||||
// Exit using found hitpoint group if this hitpoint is leader of any
|
||||
if (_x select 0 == _hitPoint) exitWith {
|
||||
|
@ -35,14 +35,12 @@ _hitPointDamage = _hitPointDamage max ([_unit] call FUNC(getPostRepairDamage));
|
||||
_hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(hitpointGroups);
|
||||
_hitpointGroup = [];
|
||||
if (isArray _hitpointGroupConfig) then {
|
||||
// Loop through hitpoint groups
|
||||
// Retrieve group if current hitpoint is leader of any
|
||||
{
|
||||
// Exit using found hitpoint group if this hitpoint is leader of any
|
||||
if (_x select 0 == _hitPoint) exitWith {
|
||||
([_vehicle] call EFUNC(common,getHitPointsWithSelections)) params ["_hitpoints"];
|
||||
// Loop through the found group
|
||||
// Set all sub-group hitpoints' damage to 0, if a hitpoint is invalid print RPT error
|
||||
{
|
||||
// If hitpoint is valid set damage to 0, else print RPT error
|
||||
if (_x in _hitpoints) then {
|
||||
["setVehicleHitPointDamage", _vehicle, [_vehicle, _x, 0]] call EFUNC(common,targetEvent);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user