| 255 | //============================================================================// |
| 256 | |
| 257 | static bool clearPlayerBlocks(Player* player, void* data) { |
| 258 | EventClient* ec = (EventClient*)data; |
| 259 | |
| 260 | // clear the player block |
| 261 | player->getGfxBlock().remove(ec); |
| 262 | player->getRadarGfxBlock().remove(ec); |
| 263 | |
| 264 | // clear the player shot blocks |
| 265 | const int maxShots = player->getMaxShots(); |
| 266 | for (int s = 0; s < maxShots; s++) { |
| 267 | ShotPath* shot = player->getShot(s); |
| 268 | if (shot) { |
| 269 | shot->getGfxBlock().remove(ec); |
| 270 | shot->getRadarGfxBlock().remove(ec); |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | return false; // do not break the loop |
| 275 | } |
| 276 | |
| 277 | |
| 278 | void GfxBlockMgr::removeClient(EventClient* ec) { |
nothing calls this directly
no test coverage detected