MCPcopy Create free account
hub / github.com/bwapi/bwapi / sightRange

Method sightRange

bwapi/BWAPILIB/Source/Player.cpp:71–80  ·  view source on GitHub ↗

--------------------------------------------- SIGHT RANGE ------------------------------------------------

Source from the content-addressed store, hash-verified

69}
70//--------------------------------------------- SIGHT RANGE ------------------------------------------------
71int PlayerInterface::sightRange(UnitType unit) const
72{
73 int range = unit.sightRange();
74 if ((unit == UnitTypes::Terran_Ghost && getUpgradeLevel(UpgradeTypes::Ocular_Implants) > 0) ||
75 (unit == UnitTypes::Zerg_Overlord && getUpgradeLevel(UpgradeTypes::Antennae) > 0) ||
76 (unit == UnitTypes::Protoss_Observer && getUpgradeLevel(UpgradeTypes::Sensor_Array) > 0) ||
77 (unit == UnitTypes::Protoss_Scout && getUpgradeLevel(UpgradeTypes::Apial_Sensors) > 0))
78 range = 11*32;
79 return range;
80}
81//--------------------------------------------- GROUND WEAPON DAMAGE COOLDOWN ------------------------------
82int PlayerInterface::weaponDamageCooldown(UnitType unit) const
83{

Callers 3

FindNewAttackTargetMethod · 0.45
writeUnitInfoFunction · 0.45
Filters.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected