diff options
author | rubidium <rubidium@openttd.org> | 2014-07-27 18:16:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-07-27 18:16:03 +0000 |
commit | 3d2895dbd1edf15d0a2dad49890ebf13514cbe10 (patch) | |
tree | 7ad2f6c7e2824f4d4931fe64d6f38b8d8f3f7be1 /src | |
parent | 3822f85379c297519ff15613ec2b6982d5862e9d (diff) | |
download | openttd-3d2895dbd1edf15d0a2dad49890ebf13514cbe10.tar.xz |
(svn r26706) -Fix [FS#6015] (r20644): wrong breakdown sound was played for ships
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index bd8d41b2b..e7c26aa50 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1206,9 +1206,10 @@ bool Vehicle::HandleBreakdown() this->cur_speed = 0; if (!PlayVehicleSound(this, VSE_BREAKDOWN)) { + bool train_or_ship = this->type == VEH_TRAIN || this->type == VEH_SHIP; SndPlayVehicleFx((_settings_game.game_creation.landscape != LT_TOYLAND) ? - (this->type == VEH_TRAIN ? SND_10_TRAIN_BREAKDOWN : SND_0F_VEHICLE_BREAKDOWN) : - (this->type == VEH_TRAIN ? SND_3A_COMEDY_BREAKDOWN_2 : SND_35_COMEDY_BREAKDOWN), this); + (train_or_ship ? SND_10_TRAIN_BREAKDOWN : SND_0F_VEHICLE_BREAKDOWN) : + (train_or_ship ? SND_3A_COMEDY_BREAKDOWN_2 : SND_35_COMEDY_BREAKDOWN), this); } if (!(this->vehstatus & VS_HIDDEN) && !HasBit(EngInfo(this->engine_type)->misc_flags, EF_NO_BREAKDOWN_SMOKE)) { |