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

Method useTech

bwapi/TestAIModule/Source/UseTechTest.cpp:330–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 }
329}
330void UseTechTest::useTech()
331{
332 bool used=false;
333 if (targetPosition != Positions::None)
334 used=user->useTech(techType,targetPosition);
335 else if (targetUnit != NULL)
336 used=user->useTech(techType,targetUnit);
337 else
338 used=user->useTech(techType);
339 if (used==false)
340 {
341 log("Error: %s",Broodwar->getLastError().c_str());
342 }
343
344 usedTech = true;
345 startFrame = Broodwar->getFrameCount();
346}
347void UseTechTest::update()
348{
349 if (running == false) return;

Callers 1

onFrameMethod · 0.45

Calls 4

logFunction · 0.85
c_strMethod · 0.80
getLastErrorMethod · 0.80
getFrameCountMethod · 0.45

Tested by

no test coverage detected