mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r9009) -Fix (r1): Determine whether to play a sound or not when entering a tunnel based on engine type (only steam engines) instead of on spritenum which can be invalid for newgrf trains. DBSet(XL) or any other steam trains without newsounds should sound their horn now.
This commit is contained in:
parent
ebe9bd4539
commit
b3f59814de
@ -1265,7 +1265,7 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y
|
||||
|
||||
if (v->u.rail.track != TRACK_BIT_WORMHOLE && dir == vdir) {
|
||||
if (IsFrontEngine(v) && fc == _tunnel_fractcoord_1[dir]) {
|
||||
if (!PlayVehicleSound(v, VSE_TUNNEL) && v->spritenum < 4) {
|
||||
if (!PlayVehicleSound(v, VSE_TUNNEL) && RailVehInfo(v->engine_type)->engclass == 0) {
|
||||
SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
|
||||
}
|
||||
return VETSB_CONTINUE;
|
||||
|
Loading…
Reference in New Issue
Block a user