google-code-export / bwapi

Automatically exported from code.google.com/p/bwapi
0 stars 0 forks source link

comsat scanner sweep problem #147

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
std::set<BWAPI::Unit*> centers=Broodwar->self()->getUnits();
for(std::set<BWAPI::Unit*>::iterator c=centers.begin();c!=centers.end
();c++){
    if((*c)->getType()==BWAPI::UnitTypes::Terran_Command_Center && 
(*c)->isCompleted() && (*c)->getAddon()->isCompleted())
    {
        if((*c)->getAddon()->getEnergy()>=50)
        {
            (*c)->getAddon()->useTech
(BWAPI::TechTypes::Scanner_Sweep,(*enemy)->getPosition());
            break;
        }
    }
}

this, is my codes to using scanner sweep. but did not work.
What is the expected output? What do you see instead?
detecting any cloaked,burrowed units

What version of the product are you using? On what operating system?
bwapi 2.3.1 , win xp pro sp3, vs2008express sp1

Please provide any additional information below.
BWAPI::UnitTypes::Terran_Comsat_Station is also din't work.

Original issue reported on code.google.com by gg.manag...@gmail.com on 29 Nov 2009 at 9:45

GoogleCodeExporter commented 9 years ago
Fixed in r1665

Original comment by lowerlo...@gmail.com on 29 Nov 2009 at 11:08