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.
@ -78,7 +78,7 @@ namespace ace {
|
||||
}
|
||||
}
|
||||
if (highestSpot == NULL) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
int c = 0;
|
||||
@ -94,10 +94,10 @@ namespace ace {
|
||||
{
|
||||
injuryToAdd = highestSpot;
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
int indexNewInjuryToAdd = rand() % information.size();
|
||||
injuryToAdd = information.at(indexNewInjuryToAdd);
|
||||
injuryToAdd = information.at(indexNewInjuryToAdd);
|
||||
}
|
||||
|
||||
int bodyPartID = selection;
|
||||
@ -105,7 +105,7 @@ namespace ace {
|
||||
{
|
||||
bodyPartID = rand() % 6;
|
||||
}
|
||||
|
||||
|
||||
injuries::OpenWound newWound(woundID++, injuryToAdd->ID, bodyPartID, 1, injuryToAdd->bloodLoss, injuryToAdd->pain);
|
||||
injuriesToAdd.push_back(newWound);
|
||||
}
|
||||
@ -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