mirror of https://github.com/OpenTTD/OpenTTD
(svn r9800) -Codechange: play sound effects based on the engine class, not the rail type (mart3p).
parent
fe1306ce65
commit
208e40a839
|
@ -2087,22 +2087,15 @@ static void TrainPlayLeaveStationSound(const Vehicle* v)
|
||||||
static const SoundFx sfx[] = {
|
static const SoundFx sfx[] = {
|
||||||
SND_04_TRAIN,
|
SND_04_TRAIN,
|
||||||
SND_0A_TRAIN_HORN,
|
SND_0A_TRAIN_HORN,
|
||||||
SND_0A_TRAIN_HORN
|
SND_0A_TRAIN_HORN,
|
||||||
|
SND_47_MAGLEV_2,
|
||||||
|
SND_41_MAGLEV
|
||||||
};
|
};
|
||||||
|
|
||||||
if (PlayVehicleSound(v, VSE_START)) return;
|
if (PlayVehicleSound(v, VSE_START)) return;
|
||||||
|
|
||||||
EngineID engtype = v->engine_type;
|
EngineID engtype = v->engine_type;
|
||||||
switch (RailVehInfo(engtype)->railtype) {
|
SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], v);
|
||||||
case RAILTYPE_RAIL:
|
|
||||||
case RAILTYPE_ELECTRIC:
|
|
||||||
SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], v);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RAILTYPE_MONO: SndPlayVehicleFx(SND_47_MAGLEV_2, v); break;
|
|
||||||
case RAILTYPE_MAGLEV: SndPlayVehicleFx(SND_41_MAGLEV, v); break;
|
|
||||||
default: NOT_REACHED();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool CheckTrainStayInDepot(Vehicle *v)
|
static bool CheckTrainStayInDepot(Vehicle *v)
|
||||||
|
|
Loading…
Reference in New Issue