equal
deleted
inserted
replaced
2085 static void TrainPlayLeaveStationSound(const Vehicle* v) |
2085 static void TrainPlayLeaveStationSound(const Vehicle* v) |
2086 { |
2086 { |
2087 static const SoundFx sfx[] = { |
2087 static const SoundFx sfx[] = { |
2088 SND_04_TRAIN, |
2088 SND_04_TRAIN, |
2089 SND_0A_TRAIN_HORN, |
2089 SND_0A_TRAIN_HORN, |
2090 SND_0A_TRAIN_HORN |
2090 SND_0A_TRAIN_HORN, |
|
2091 SND_47_MAGLEV_2, |
|
2092 SND_41_MAGLEV |
2091 }; |
2093 }; |
2092 |
2094 |
2093 if (PlayVehicleSound(v, VSE_START)) return; |
2095 if (PlayVehicleSound(v, VSE_START)) return; |
2094 |
2096 |
2095 EngineID engtype = v->engine_type; |
2097 EngineID engtype = v->engine_type; |
2096 switch (RailVehInfo(engtype)->railtype) { |
2098 SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], v); |
2097 case RAILTYPE_RAIL: |
|
2098 case RAILTYPE_ELECTRIC: |
|
2099 SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], v); |
|
2100 break; |
|
2101 |
|
2102 case RAILTYPE_MONO: SndPlayVehicleFx(SND_47_MAGLEV_2, v); break; |
|
2103 case RAILTYPE_MAGLEV: SndPlayVehicleFx(SND_41_MAGLEV, v); break; |
|
2104 default: NOT_REACHED(); |
|
2105 } |
|
2106 } |
2099 } |
2107 |
2100 |
2108 static bool CheckTrainStayInDepot(Vehicle *v) |
2101 static bool CheckTrainStayInDepot(Vehicle *v) |
2109 { |
2102 { |
2110 /* bail out if not all wagons are in the same depot or not in a depot at all */ |
2103 /* bail out if not all wagons are in the same depot or not in a depot at all */ |