diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index 73e10fe8c..a3843e790 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -1072,6 +1072,10 @@ namespace Glest { //misc std::vector < string > attackStrengthXMLTags; + /* + * Best practice would be to remove the incorrect spelling + * of "strength", but that would break a lot of 3rd party mods + */ attackStrengthXMLTags.push_back("attack-strenght"); attackStrengthXMLTags.push_back("attack-strength"); attackStrength = diff --git a/source/glest_game/types/upgrade_type.cpp b/source/glest_game/types/upgrade_type.cpp index 8f1e4d07f..2e2c2a566 100644 --- a/source/glest_game/types/upgrade_type.cpp +++ b/source/glest_game/types/upgrade_type.cpp @@ -162,6 +162,10 @@ namespace Glest { attackStrengthIsMultiplier = false; std::vector < string > attackStrengthXMLTags; + /* + * Best practice would be to remove the incorrect spelling + * of "strength", but that would break a lot of 3rd party mods + */ attackStrengthXMLTags.push_back("attack-strenght"); attackStrengthXMLTags.push_back("attack-strength"); if (upgradeNode->hasChildWithAliases(attackStrengthXMLTags) == true) { diff --git a/source/shared_lib/include/map/map_preview.h b/source/shared_lib/include/map/map_preview.h index d055da6bd..dcac134b4 100644 --- a/source/shared_lib/include/map/map_preview.h +++ b/source/shared_lib/include/map/map_preview.h @@ -244,7 +244,7 @@ namespace Shared { void resetHeights(int height); void realRandomize(int minimumHeight, int maximumHeight, int chanceDivider, int smoothRecursions); - void applyNewHeight(float newHeight, int x, int y, int strenght); + void applyNewHeight(float newHeight, int x, int y, int strength); bool hasFileLoaded() const { return fileLoaded; diff --git a/source/shared_lib/sources/map/map_preview.cpp b/source/shared_lib/sources/map/map_preview.cpp index 9d9999ab1..dc4d8f8af 100644 --- a/source/shared_lib/sources/map/map_preview.cpp +++ b/source/shared_lib/sources/map/map_preview.cpp @@ -1022,8 +1022,8 @@ namespace Shared { } } - void MapPreview::applyNewHeight(float newHeight, int x, int y, int strenght) { - cells[x][y].height = static_cast(((cells[x][y].height * strenght) + newHeight) / (strenght + 1)); + void MapPreview::applyNewHeight(float newHeight, int x, int y, int strength) { + cells[x][y].height = static_cast(((cells[x][y].height * strength) + newHeight) / (strength + 1)); hasChanged = true; }