diff --git a/extensions/medical/DamageType.cpp b/extensions/medical/DamageType.cpp index 5434d79e98..2b3a5b2e61 100644 --- a/extensions/medical/DamageType.cpp +++ b/extensions/medical/DamageType.cpp @@ -2,7 +2,7 @@ using namespace ace::medical; -injuries::DamageType::DamageType(std::string aTypeName, unsigned int minimalLethalDamage, unsigned int minDamage, unsigned int maxDamage) +injuries::DamageType::DamageType(std::string aTypeName, double minimalLethalDamage, double minDamage, double maxDamage) : typeName(aTypeName), minLethalDamage(minimalLethalDamage), minDamageThreshold(minDamage), maxDamageThreshold(maxDamage) { } diff --git a/extensions/medical/DamageType.h b/extensions/medical/DamageType.h index 449060070b..b690c46627 100644 --- a/extensions/medical/DamageType.h +++ b/extensions/medical/DamageType.h @@ -11,13 +11,13 @@ namespace ace { class DamageType { public: - DamageType(std::string aTypeName, unsigned int minimalLethalDamage, unsigned int minDamageThreshold, unsigned int maxDamageThreshold); + DamageType(std::string aTypeName, double minimalLethalDamage, double minDamageThreshold, double maxDamageThreshold); ~DamageType(); std::string typeName; - unsigned int minLethalDamage; - unsigned int minDamageThreshold; - unsigned int maxDamageThreshold; + double minLethalDamage; + double minDamageThreshold; + double maxDamageThreshold; std::vector> possibleInjuries; }; diff --git a/extensions/medical/InjuryType.cpp b/extensions/medical/InjuryType.cpp index 22c04c4126..cca9b20fd3 100644 --- a/extensions/medical/InjuryType.cpp +++ b/extensions/medical/InjuryType.cpp @@ -3,7 +3,7 @@ using namespace ace::medical; -injuries::InjuryType::InjuryType(signed int anId, const std::string& aClassname, std::vector& allowedSelections, signed int theBloodLoss, signed int thePain, signed int minimumDamage, signed int maximumDamage, std::vector& possibleCauses, std::string& aDisplayname) +injuries::InjuryType::InjuryType(signed int anId, const std::string& aClassname, std::vector& allowedSelections, double theBloodLoss, double thePain, double minimumDamage, double maximumDamage, std::vector& possibleCauses, std::string& aDisplayname) : ID(anId), className(aClassname), selections(allowedSelections), bloodLoss(theBloodLoss), pain(thePain), minDamage(minimumDamage), maxDamage(maximumDamage), causes(possibleCauses), displayName(aDisplayname) { } diff --git a/extensions/medical/InjuryType.h b/extensions/medical/InjuryType.h index c03760b568..ad99518252 100644 --- a/extensions/medical/InjuryType.h +++ b/extensions/medical/InjuryType.h @@ -9,16 +9,16 @@ namespace ace { class InjuryType { public: - InjuryType(signed int anId, const std::string& aClassname, std::vector& allowedSelections, signed int theBloodLoss, signed int thePain, signed int minimumDamage, signed int maximumDamage, std::vector& possibleCauses, std::string& aDisplayname); + InjuryType(signed int anId, const std::string& aClassname, std::vector& allowedSelections, double theBloodLoss, double thePain, double minimumDamage, double maximumDamage, std::vector& possibleCauses, std::string& aDisplayname); ~InjuryType(); signed int ID; std::string className; std::vector selections; - signed int bloodLoss; - signed int pain; - signed int minDamage; - signed int maxDamage; + double bloodLoss; + double pain; + double minDamage; + double maxDamage; std::vector causes; std::string displayName; }; diff --git a/extensions/medical/OpenWound.cpp b/extensions/medical/OpenWound.cpp index b0d614e6be..268929fc92 100644 --- a/extensions/medical/OpenWound.cpp +++ b/extensions/medical/OpenWound.cpp @@ -3,7 +3,7 @@ using namespace ace::medical; -injuries::OpenWound::OpenWound(unsigned int anID, unsigned int aBodyPart, unsigned int bloodloss) : classID(anID), bodyPart(aBodyPart), bloodlossRate(bloodloss) +injuries::OpenWound::OpenWound(double anID, double aBodyPart, double bloodloss) : classID(anID), bodyPart(aBodyPart), bloodlossRate(bloodloss) { } diff --git a/extensions/medical/OpenWound.h b/extensions/medical/OpenWound.h index 478e54a597..b2a9baccb8 100644 --- a/extensions/medical/OpenWound.h +++ b/extensions/medical/OpenWound.h @@ -8,14 +8,14 @@ namespace ace { class OpenWound { public: - OpenWound(unsigned int anID, unsigned int aBodyPart, unsigned int bloodloss); + OpenWound(double anID, double aBodyPart, double bloodloss); ~OpenWound(); std::string AsString(); - unsigned int classID; - unsigned int bodyPart; - unsigned int bloodlossRate; + double classID; + double bodyPart; + double bloodlossRate; }; } diff --git a/extensions/medical/handleDamage.cpp b/extensions/medical/handleDamage.cpp index 60fbe83012..1a6612c107 100644 --- a/extensions/medical/handleDamage.cpp +++ b/extensions/medical/handleDamage.cpp @@ -15,7 +15,7 @@ handleDamage::~handleDamage() { } -/* static */ std::vector handleDamage::HandleDamageWounds(const std::string& selectionName, signed int amountOfDamage, const std::string& typeOfDamage) +/* static */ std::vector handleDamage::HandleDamageWounds(const std::string& selectionName, double amountOfDamage, const std::string& typeOfDamage) { std::vector wounds; int selectionN = SelectionToNumber(selectionName); @@ -32,9 +32,9 @@ handleDamage::~handleDamage() if (input.size() == 4) { std::string typeName = input[0]; - unsigned int minimalLethalDamage = std::stod(input[1]); - unsigned int minDamageThreshold = std::stod(input[2]); - unsigned int maxDamageThreshold = std::stod(input[3]); + double minimalLethalDamage = std::stod(input[1]); + double minDamageThreshold = std::stod(input[2]); + double maxDamageThreshold = std::stod(input[3]); std::shared_ptr type(new injuries::DamageType(typeName, minimalLethalDamage, minDamageThreshold, maxDamageThreshold)); damageTypes.push_back(type); @@ -50,11 +50,11 @@ handleDamage::~handleDamage() int ID = std::stod(input[0]); std::string className = input[1]; std::vector allowedSelections; // input[2]; - unsigned int bloodLoss = std::stod(input[3]); - unsigned int pain = std::stod(input[4]); + double bloodLoss = std::stod(input[3]); + double pain = std::stod(input[4]); - unsigned int minDamage = std::stod(input[5]); - unsigned int maxDamage = std::stod(input[6]); + double minDamage = std::stod(input[5]); + double maxDamage = std::stod(input[6]); std::vector possibleCauses; // input[7]; std::string displayName = input[8]; diff --git a/extensions/medical/handleDamage.h b/extensions/medical/handleDamage.h index c62aa88e5f..7e030f2b84 100644 --- a/extensions/medical/handleDamage.h +++ b/extensions/medical/handleDamage.h @@ -21,7 +21,7 @@ namespace ace { /** * */ - static std::vector HandleDamageWounds(const std::string& selectionName, signed int amountOfDamage, const std::string& typeOfDamage); + static std::vector HandleDamageWounds(const std::string& selectionName, double amountOfDamage, const std::string& typeOfDamage); /** * diff --git a/extensions/medical/medical.cpp b/extensions/medical/medical.cpp index 3e452b751f..ae0b549613 100644 --- a/extensions/medical/medical.cpp +++ b/extensions/medical/medical.cpp @@ -35,7 +35,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) { else { std::vector arguments = parseExtensionInput(function); - if (arguments.size > 0) + if (arguments.size() > 0) { std::string command = arguments.at(0); // can we not just use C++11?