- apply sight upgrades when units sight is involved in cacls
This commit is contained in:
parent
3965f72b5a
commit
b0f7b078f6
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue