diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 646922bf..88587cf5 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -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) { diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 05f13bea..63a22120 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -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); }