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

Method updateBullets

bwapi/BWAPI/Source/BWAPI/GameBullets.cpp:21–44  ·  view source on GitHub ↗

--------------------------------------------- UPDATE BULLETS ---------------------------------------------

Source from the content-addressed store, hash-verified

19 }
20 //--------------------------------------------- UPDATE BULLETS ---------------------------------------------
21 void GameImpl::updateBullets()
22 {
23 // Reset bullets information
24 for (BulletImpl* b : bulletArray)
25 b->setExists(false);
26 bullets.clear();
27
28 // Repopulate bullets set
29 for ( BW::CBullet *curritem = BW::BWDATA::BulletNodeTable_FirstElement;
30 curritem;
31 curritem = curritem->next )
32 {
33 BulletImpl *b = BulletImpl::BWBulletToBWAPIBullet(curritem);
34 b->setExists(true);
35 this->bullets.insert(b);
36 }
37
38 // Update all bullets info
39 for (BulletImpl* b : bulletArray)
40 {
41 b->saveExists();
42 b->updateData();
43 }
44 }
45
46}
47

Callers 1

updateMethod · 0.95

Calls 4

setExistsMethod · 0.80
saveExistsMethod · 0.80
clearMethod · 0.45
updateDataMethod · 0.45

Tested by

no test coverage detected