- apply sight upgrades when units sight is involved in cacls

This commit is contained in:
SoftCoder 2014-12-21 17:23:20 -08:00
parent 3965f72b5a
commit b0f7b078f6
2 changed files with 3 additions and 3 deletions

View File

@ -1406,7 +1406,7 @@ FowAlphaCellsLookupItem Unit::getFogOfWarRadius(bool useCache) const {
}
//iterate through all cells
int sightRange= this->getType()->getSight();
int sightRange= this->getType()->getTotalSight(this->getTotalUpgrade());
int radius = sightRange + World::indirectSightRange;
PosCircularIterator pci(map, this->getPosNotThreadSafe(), radius);
FowAlphaCellsLookupItem result;
@ -4365,7 +4365,7 @@ uint32 Unit::getFrameCount() const {
void Unit::exploreCells() {
if(this->isOperative() == true) {
const Vec2i &newPos = this->getCenteredPos();
int sightRange = this->getType()->getSight();
int sightRange = this->getType()->getTotalSight(this->getTotalUpgrade());
int teamIndex = this->getTeam();
if(game == NULL) {

View File

@ -2760,7 +2760,7 @@ bool UnitUpdater::attackerOnSight(Unit *unit, Unit **rangedPtr, bool evalMode){
}
bool UnitUpdater::attackableOnSight(Unit *unit, Unit **rangedPtr, const AttackSkillType *ast, bool evalMode) {
int range= unit->getType()->getSight();
int range = unit->getType()->getTotalSight(unit->getTotalUpgrade());
return unitOnRange(unit, range, rangedPtr, ast, evalMode);
}