MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / die

Method die

game/state/shared/projectile.cpp:167–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void 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
187Collision Projectile::checkProjectileCollision(TileMap &map)
188{

Callers

nothing calls this directly

Calls 3

handleProjectileHitMethod · 0.45
removeFromMapMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected