From b6d5db9157ada1834f47e8d240ab5a76bfd20401 Mon Sep 17 00:00:00 2001 From: jonpas Date: Wed, 26 Aug 2015 23:09:04 +0200 Subject: [PATCH] Reverted IGNORED_HITPOINTS, Added Taru glasses to it --- addons/repair/functions/fnc_addRepairActions.sqf | 4 +++- addons/repair/script_component.hpp | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 15cc0de881..94ad9b204d 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -14,7 +14,6 @@ * Public: No */ #include "script_component.hpp" -#define TRACK_HITPOINTS ["HitLTrack", "HitRTrack"] params ["_vehicle"]; TRACE_1("params", _vehicle); @@ -75,6 +74,9 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1; [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); } else { + // exit if the hitpoint is in the blacklist, e.g. glasses + if (_x in IGNORED_HITPOINTS) exitWith {}; + private ["_hitpointGroupConfig", "_inHitpointSubGroup", "_currentHitpoint"]; // Get hitpoint groups if available diff --git a/addons/repair/script_component.hpp b/addons/repair/script_component.hpp index 0714b1a568..89983dd0e8 100644 --- a/addons/repair/script_component.hpp +++ b/addons/repair/script_component.hpp @@ -10,3 +10,7 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + + +#define IGNORED_HITPOINTS ["HitGlass1", "HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6", "HitGlass7", "HitGlass8", "HitGlass9", "HitGlass10", "HitGlass11", "HitGlass12", "HitGlass13", "HitGlass14", "HitGlass15", "HitRGlass", "HitLGlass", "Glass_1_hitpoint", "Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"] +#define TRACK_HITPOINTS ["HitLTrack", "HitRTrack"]