diff options
author | rubidium <rubidium@openttd.org> | 2007-05-06 19:51:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-06 19:51:25 +0000 |
commit | 969366354d5b0d2966d2a2501fee1ca07edb7a7f (patch) | |
tree | 9a17450d5e975fc9ff6428084fe313a3b7513b3b | |
parent | f47e81c90028898a387c1b69fe43954f2daa5027 (diff) | |
download | openttd-969366354d5b0d2966d2a2501fee1ca07edb7a7f.tar.xz |
(svn r9800) -Codechange: play sound effects based on the engine class, not the rail type (mart3p).
-rw-r--r-- | src/train_cmd.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index c156b7aec..2e9911aa4 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2087,22 +2087,15 @@ static void TrainPlayLeaveStationSound(const Vehicle* v) static const SoundFx sfx[] = { SND_04_TRAIN, 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; EngineID engtype = v->engine_type; - switch (RailVehInfo(engtype)->railtype) { - 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(); - } + SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], v); } static bool CheckTrainStayInDepot(Vehicle *v) |