mirror of
https://github.com/glest/glest-source.git
synced 2025-08-10 02:16:31 +02:00
maint:addressing "strength" issue
@JoaoMarcosCSilva helps this project stay sharp!
This commit is contained in:
@@ -1072,6 +1072,10 @@ namespace Glest {
|
|||||||
|
|
||||||
//misc
|
//misc
|
||||||
std::vector < string > attackStrengthXMLTags;
|
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-strenght");
|
||||||
attackStrengthXMLTags.push_back("attack-strength");
|
attackStrengthXMLTags.push_back("attack-strength");
|
||||||
attackStrength =
|
attackStrength =
|
||||||
|
@@ -162,6 +162,10 @@ namespace Glest {
|
|||||||
attackStrengthIsMultiplier = false;
|
attackStrengthIsMultiplier = false;
|
||||||
|
|
||||||
std::vector < string > attackStrengthXMLTags;
|
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-strenght");
|
||||||
attackStrengthXMLTags.push_back("attack-strength");
|
attackStrengthXMLTags.push_back("attack-strength");
|
||||||
if (upgradeNode->hasChildWithAliases(attackStrengthXMLTags) == true) {
|
if (upgradeNode->hasChildWithAliases(attackStrengthXMLTags) == true) {
|
||||||
|
@@ -244,7 +244,7 @@ namespace Shared {
|
|||||||
|
|
||||||
void resetHeights(int height);
|
void resetHeights(int height);
|
||||||
void realRandomize(int minimumHeight, int maximumHeight, int chanceDivider, int smoothRecursions);
|
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 {
|
bool hasFileLoaded() const {
|
||||||
return fileLoaded;
|
return fileLoaded;
|
||||||
|
@@ -1022,8 +1022,8 @@ namespace Shared {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapPreview::applyNewHeight(float newHeight, int x, int y, int strenght) {
|
void MapPreview::applyNewHeight(float newHeight, int x, int y, int strength) {
|
||||||
cells[x][y].height = static_cast<float>(((cells[x][y].height * strenght) + newHeight) / (strenght + 1));
|
cells[x][y].height = static_cast<float>(((cells[x][y].height * strength) + newHeight) / (strength + 1));
|
||||||
hasChanged = true;
|
hasChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user