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 | 208e40a839699181ad319a90fc0cffaa850fe6e0 (patch) | |
tree | 9a17450d5e975fc9ff6428084fe313a3b7513b3b | |
parent | fe1306ce656d9e33fced2b597bc585a61299d932 (diff) | |
download | openttd-208e40a839699181ad319a90fc0cffaa850fe6e0.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) |