0x004AA407
| 152 | |
| 153 | // 0x004AA407 |
| 154 | void VehicleBase::explodeComponent() |
| 155 | { |
| 156 | assert(subType == VehicleEntityType::bogie || subType == VehicleEntityType::body_start || subType == VehicleEntityType::body_continued); |
| 157 | |
| 158 | const auto pos = position + World::Pos3{ 0, 0, 22 }; |
| 159 | Audio::playSound(Audio::SoundId::crash, Audio::ChannelId::vehicles, pos); |
| 160 | |
| 161 | ExplosionCloud::create(pos); |
| 162 | |
| 163 | const auto numParticles = std::min(spriteWidth / 4, 7); |
| 164 | for (auto i = 0; i < numParticles; ++i) |
| 165 | { |
| 166 | ColourScheme colourScheme = (subType == VehicleEntityType::bogie) ? reinterpret_cast<VehicleBogie*>(this)->colourScheme : reinterpret_cast<VehicleBody*>(this)->colourScheme; |
| 167 | VehicleCrashParticle::create(pos, colourScheme); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | // 0x004AA464 |
| 172 | void VehicleBase::destroyTrain() |
no test coverage detected