Play a sound for a train leaving the station. */
| 2213 | |
| 2214 | /** Play a sound for a train leaving the station. */ |
| 2215 | void Train::PlayLeaveStationSound(bool force) const |
| 2216 | { |
| 2217 | static const SoundFx sfx[] = { |
| 2218 | SND_04_DEPARTURE_STEAM, |
| 2219 | SND_0A_DEPARTURE_TRAIN, |
| 2220 | SND_0A_DEPARTURE_TRAIN, |
| 2221 | SND_47_DEPARTURE_MONORAIL, |
| 2222 | SND_41_DEPARTURE_MAGLEV |
| 2223 | }; |
| 2224 | |
| 2225 | if (PlayVehicleSound(this, VSE_START, force)) return; |
| 2226 | |
| 2227 | SndPlayVehicleFx(sfx[RailVehInfo(this->engine_type)->engclass], this); |
| 2228 | } |
| 2229 | |
| 2230 | /** |
| 2231 | * Check if the train is on the last reserved tile and try to extend the path then. |
no test coverage detected