mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Use hitpoints in medical extension (#4494)
This commit is contained in:
parent
a54aec72bc
commit
b4ab15bb47
BIN
ace_medical.dll
BIN
ace_medical.dll
Binary file not shown.
@ -202,14 +202,14 @@ namespace ace {
|
||||
}
|
||||
}
|
||||
|
||||
int handleDamage::SelectionToNumber(const std::string& selectionName)
|
||||
int handleDamage::SelectionToNumber(const std::string& hitpointName)
|
||||
{
|
||||
// TODO use dynamic selections instead
|
||||
std::vector<std::string> selections = { "head", "body", "hand_l", "hand_r", "leg_l", "leg_r" };
|
||||
std::vector<std::string>::iterator it = find(selections.begin(), selections.end(), selectionName);
|
||||
if (it != selections.end())
|
||||
std::vector<std::string> hitpoints = { "Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg" };
|
||||
std::vector<std::string>::iterator it = find(hitpoints.begin(), hitpoints.end(), hitpointName);
|
||||
if (it != hitpoints.end())
|
||||
{
|
||||
return it - selections.begin();
|
||||
return it - hitpoints.begin();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user