From b0f8675a6583b105a82fb3c677fbfb68dbbc54c2 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 25 Jun 2011 09:01:31 +0000 Subject: [PATCH] - small bugfix for attack-boost check --- source/glest_game/type_instances/unit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 6ffb334e..dce0a6b3 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1559,13 +1559,13 @@ void Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) { throw runtime_error(szBuf); } - if(boost->isAffected(source, this)) { + //if(boost->isAffected(source, this)) { totalUpgrade.apply(&boost->boostUpgrade); checkItemInVault(&this->hp,this->hp); hp += boost->boostUpgrade.getMaxHp(); addItemToVault(&this->hp,this->hp); - } + //} } void Unit::deapplyAttackBoost(const AttackBoost *boost, const Unit *source) { @@ -1575,13 +1575,13 @@ void Unit::deapplyAttackBoost(const AttackBoost *boost, const Unit *source) { throw runtime_error(szBuf); } - if(boost->isAffected(source, this)) { + //if(boost->isAffected(source, this)) { totalUpgrade.deapply(&boost->boostUpgrade); checkItemInVault(&this->hp,this->hp); hp -= boost->boostUpgrade.getMaxHp(); addItemToVault(&this->hp,this->hp); - } + //} } void Unit::applyUpgrade(const UpgradeType *upgradeType){