Skip to content
Permalink
Browse files
- apply sight upgrades when units sight is involved in cacls
  • Loading branch information
softcoder committed Dec 22, 2014
1 parent 3965f72 commit b0f7b078f6bd1eb969d5ec841b9b9d7fa9e3cd2d
Showing with 3 additions and 3 deletions.
  1. +2 −2 source/glest_game/type_instances/unit.cpp
  2. +1 −1 source/glest_game/world/unit_updater.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) {
@@ -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);
}

0 comments on commit b0f7b07

Please sign in to comment.