diff --git a/data/glest_game b/data/glest_game index 929c6bac..f674bb74 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit 929c6bac3c2654aa549aaecd589cdc15a0abdd61 +Subproject commit f674bb7461ea1ada93c96a7c3167daa4d2dc1ef3 diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 21ccd667..455d2e8b 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -5476,7 +5476,10 @@ void Renderer::renderSelectionEffects(int healthbarMode) { if(healthbarsVisible) { hpRatio=unit->getHpRatio(); selectionCircleThickness=0.05f; - hpRatio=1.0f; + //hpRatio=1.0f; + } + else { + hpRatio=0.0f; } if(world->getThisFactionIndex() == unit->getFactionIndex()) { diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index 77ee5b24..57db9210 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -62,7 +62,7 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { else { // All units are affected (including enemies) if(targetType == abtAll) { - destUnitMightApply = (boostUnitList.empty() && tags.empty()); + //destUnitMightApply = (boostUnitList.empty() && tags.empty()); destUnitMightApply = isInUnitListOrTags(dest->getType()); } // Only same faction units are affected @@ -70,7 +70,7 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { //if(boostUnitList.empty() == true) { if(source->getFactionIndex() == dest->getFactionIndex()) { //destUnitMightApply = true; - destUnitMightApply = (boostUnitList.empty() && tags.empty()); + //destUnitMightApply = (boostUnitList.empty() && tags.empty()); destUnitMightApply = isInUnitListOrTags(dest->getType()); } //} @@ -80,7 +80,7 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { //if(boostUnitList.empty() == true) { if(source->isAlly(dest) == true) { //destUnitMightApply = true; - destUnitMightApply = (boostUnitList.empty() && tags.empty()); + //destUnitMightApply = (boostUnitList.empty() && tags.empty()); destUnitMightApply = isInUnitListOrTags(dest->getType()); } //} @@ -90,7 +90,7 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { //if(boostUnitList.empty() == true) { if(source->isAlly(dest) == false) { //destUnitMightApply = true; - destUnitMightApply = (boostUnitList.empty() && tags.empty()); + //destUnitMightApply = (boostUnitList.empty() && tags.empty()); destUnitMightApply = isInUnitListOrTags(dest->getType()); } //} diff --git a/source/glest_game/types/unit_type.cpp b/source/glest_game/types/unit_type.cpp index 5e1b65e6..a96600bf 100644 --- a/source/glest_game/types/unit_type.cpp +++ b/source/glest_game/types/unit_type.cpp @@ -646,7 +646,7 @@ void UnitType::loaddd(int id,const string &dir, const TechTree *techTree, } } sortedItems.clear(); - hasDup = false; + //hasDup = false; // Lootable resources (resources given/lost on death) if(parametersNode->hasChild("resources-death")) { diff --git a/source/glest_game/types/unit_type.h b/source/glest_game/types/unit_type.h index 43c36d81..8f06b895 100644 --- a/source/glest_game/types/unit_type.h +++ b/source/glest_game/types/unit_type.h @@ -79,6 +79,15 @@ private: bool negativeAllowed; public: + LootableResource() { + type=NULL; + amountValue=0; + amountFactionPercent=0; + lossValue=0; + lossFactionPercent=0; + negativeAllowed=false; + } + const ResourceType* getResourceType() const {return type;} void setResourceType(const ResourceType *type) {this->type=type;} diff --git a/source/glest_game/types/upgrade_type.cpp b/source/glest_game/types/upgrade_type.cpp index dcb22d5b..17c04643 100644 --- a/source/glest_game/types/upgrade_type.cpp +++ b/source/glest_game/types/upgrade_type.cpp @@ -781,7 +781,7 @@ void UpgradeType::load(const string &dir, const TechTree *techTree, } sortedItems.clear(); - hasDup = false; + //hasDup = false; //effects -- get list of affected units const XmlNode *effectsNode= upgradeNode->getChild("effects"); diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index dbc6428e..ffcc25cc 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -619,7 +619,7 @@ void updatePathClimbingParts(string &path,bool processPreviousDirTokenCheck) { //printf("x [%d][%c] pos [%ld][%c] [%s]\n",x,path[x],(long int)pos,path[pos],path.substr(0,x+1).c_str()); if((path[x] == '/' || path[x] == '\\') && x != (int)pos) { - string origLoop = path; + //string origLoop = path; path.erase(x,(int)pos-x); //printf("#5 [%d] [%d] [%d] CHANGE relative path from [%s] to [%s]\n",(int)pos,(int)x,(int)origLoop.length(),origLoop.c_str(),path.c_str()); @@ -2455,7 +2455,7 @@ void ValueCheckerVault::checkItemInVault(const void *ptr,int value) const { } string getUserHome() { - string home_folder = ""; + string home_folder; home_folder = safeCharPtrCopy(getenv("HOME"),8095); if(home_folder == "") { #if _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED diff --git a/source/shared_lib/sources/platform/sdl/platform_util.cpp b/source/shared_lib/sources/platform/sdl/platform_util.cpp index 69bd92a3..de618555 100644 --- a/source/shared_lib/sources/platform/sdl/platform_util.cpp +++ b/source/shared_lib/sources/platform/sdl/platform_util.cpp @@ -136,6 +136,7 @@ static int getFileAndLine(char *function, void *address, char *file, size_t flen #if __APPLE_CC__ //### TODO Will: still working this out int len = fread(buf,1,maxbufSize,f); + pclose(f); buf[len] = 0; fprintf(stderr,"< %s",buf); return -1;