| 165 | } |
| 166 | |
| 167 | void Projectile::die(GameState &state, bool displayDoodad, bool playSound, bool expired) |
| 168 | { |
| 169 | auto this_shared = shared_from_this(); |
| 170 | if (firerVehicle) |
| 171 | { |
| 172 | state.current_city->handleProjectileHit(state, this_shared, displayDoodad, playSound, |
| 173 | expired); |
| 174 | } |
| 175 | else // firerUnit or stray battle projectile |
| 176 | { |
| 177 | state.current_battle->handleProjectileHit(state, this_shared, displayDoodad, playSound, |
| 178 | expired); |
| 179 | } |
| 180 | if (this->tileObject) |
| 181 | { |
| 182 | this->tileObject->removeFromMap(); |
| 183 | this->tileObject.reset(); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | Collision Projectile::checkProjectileCollision(TileMap &map) |
| 188 | { |
nothing calls this directly
no test coverage detected