--------------------------------------------- UPDATE BULLETS ---------------------------------------------
| 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 |
no test coverage detected