-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2813 from acemod/medical-hitpoints-fix
Add method to deal with new hitpoints
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Author: Glowbal | ||
* Translate selection names into medical usable hit selection names. | ||
* Aims to deal with the new hitpoint system introduced in Arma3 v1.50 and later. | ||
* | ||
* Arguments: | ||
* 0: selection name <STRING> | ||
* | ||
* Return Value: | ||
* translated selection name <STRING> | ||
* | ||
* Example: | ||
* ["pelvis"] call ace_medical_fnc_translateSelections | ||
* Returns "body" | ||
* | ||
* Public: No | ||
*/ | ||
|
||
#define HEAD_SELECTIONS ["face_hub", "neck", "head"] | ||
#define TORSO_SELECTIONS ["pelvis", "spine1", "spine2", "spine3", "body"] | ||
#define L_ARM_SELECTIONS ["hand_l"] | ||
#define R_ARM_SELECTIONS ["hand_r"] | ||
#define L_LEG_SELECTIONS ["leg_l"] | ||
#define R_LEG_SELECTIONS ["leg_r"] | ||
|
||
params ["_selection"]; | ||
|
||
if (_selection in HEAD_SELECTIONS) exitwith {"head"}; | ||
if (_selection in TORSO_SELECTIONS) exitwith {"body"}; | ||
|
||
// Not necessary unless we get more hitpoints variants in an next arma update | ||
/*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"}; | ||
if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"}; | ||
if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"}; | ||
if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ | ||
|
||
_selection; |