Skip to content

Commit

Permalink
fix to BOSSManager
Browse files Browse the repository at this point in the history
fixed bug where BOSS would not trigger if zerg only had non-hatchery
depots
  • Loading branch information
davechurchill committed Nov 20, 2015
1 parent 9446caf commit 0e845bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions UAlbertaBot/Source/BOSSManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ void BOSSManager::reset()
// start a new search for a new goal
void BOSSManager::startNewSearch(const std::vector<MetaPair> & goalUnits)
{
size_t numWorkers = UnitUtil::GetAllUnitCount(BWAPI::Broodwar->self()->getRace().getWorker());
size_t numDepots = UnitUtil::GetAllUnitCount(BWAPI::Broodwar->self()->getRace().getCenter());
size_t numWorkers = UnitUtil::GetAllUnitCount(BWAPI::Broodwar->self()->getRace().getWorker());
size_t numDepots = UnitUtil::GetAllUnitCount(BWAPI::Broodwar->self()->getRace().getCenter())
+ UnitUtil::GetAllUnitCount(BWAPI::UnitTypes::Zerg_Lair)
+ UnitUtil::GetAllUnitCount(BWAPI::UnitTypes::Zerg_Hive);

if (numWorkers == 0)
{
Expand Down

0 comments on commit 0e845bb

Please sign in to comment.