From b4ab15bb4757108a0fc807c4b429f731b022e617 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 2 Oct 2016 09:41:17 +0200 Subject: [PATCH] Use hitpoints in medical extension (#4494) --- ace_medical.dll | Bin 223232 -> 223232 bytes extensions/medical/handleDamage.cpp | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ace_medical.dll b/ace_medical.dll index f85f1bc974b78038217b9a2e58d4330e755c1ac6..ede53b861d545c08a7b47a4902d5ebcb339e0adc 100644 GIT binary patch delta 491 zcmZp;z}s+vcY^>Uv-Ilsn}r#di!nA#-YtHfamway2}VxF7n6GxQyHIZ{;ZhG4x|z_ zy@VMpHm|XH!Nj;?^Hh5k5yptgyMos+ZkU`NlEJuP^M#N_EQ}GGizB@l8QCZAi&A0a znEW_Og_%9$%w(=;C1#F{E1UJBtC_h=N|^*+EA=`v?W)+kHEuNva$$Noj%crQx zFd9sDYshERnY^vx9pjG8OB>fS0;$kuO-4qA$@MLnj2e?)w&XLaY>sSwCI__6VM!mz z*7GZ_lrU~+Un0x6eTgj72Mxvz+o!rQ2`ia;q$Z{?0D)6}N+pQ)NlhzpEXrjF%1qAy zGoWHVsp$|g5M%n)45r814`echF|#L{nk1$sn{SuRWlC=Y1=aTU&rG?xVAgj9=9MzM zi43L;CJc!TsSL>s=F`{OGV7xWy|iVHM-vLQW7d>5WH4aR1!6;n5Fj>SuwpO<8f67! znQotH$NX5#@qx(`lMg0eOn#XBF<~%eG37AjF%>WsF_kctF*Px@FtsstFm*BYF!eDF iFby%SF>NqyG3_wzF`ZyK#dL=09Mc8c_l7b%3jqL_3!n!8 delta 477 zcmZp;z}s+vcY^>Uvuj4?W?{zVVvH4&cZ;8A?AhEc!N|$@U~;cwD&w8apA~c2fmEWV zmoTHj<~24im>3sqo@%cm!Wb}lSMVCf6_e9LG8k8Ez7VpAg)v}raikX`BirPCQ7S<4 zag+)(YsQJmT+vEE`od=Y=xS!}oKhx%*Gj$4OuGs;Z;e~c!uV!#V)9;~+43oBGK?CN z-5T;4RVHt1c*nS5^U}ukj6f>1S(A}bVsd>;CZodSmo52>GMgh?pUDBOb6C;`vi1Cm zDOZeJqH^g)Ah#rCOgOu|aK8L5dW3_y^SpHc~;GZOPs;&Y&M5d%X`YC4Du zri-TE&0u=W0a6A6+Ye+ig)y_IrluJsB^hj&&1Fh&1BKQ0_RmbYx?t9K1?H79yr~SS z3~3BT3`sy}Fnz5pvp$;8OIzl6G@(#CW=&}W1~Ud-phiQ65FoZ-umX~%K+>4OVEarv z=Eq{}H%#uByfAq)y*`v#R8_~+z|_Rl!qmpp!PLdn!_>#L#I(Y+#_} O6w?{o_l7b%3jqLR#+SDM diff --git a/extensions/medical/handleDamage.cpp b/extensions/medical/handleDamage.cpp index 2a50ba4ee6..001877a2cd 100644 --- a/extensions/medical/handleDamage.cpp +++ b/extensions/medical/handleDamage.cpp @@ -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 selections = { "head", "body", "hand_l", "hand_r", "leg_l", "leg_r" }; - std::vector::iterator it = find(selections.begin(), selections.end(), selectionName); - if (it != selections.end()) + std::vector hitpoints = { "Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg" }; + std::vector::iterator it = find(hitpoints.begin(), hitpoints.end(), hitpointName); + if (it != hitpoints.end()) { - return it - selections.begin(); + return it - hitpoints.begin(); } else {