(svn r16717) -Codechange: make IsFrontEngine() member of Train

This commit is contained in:
smatz
2009-07-01 22:22:01 +00:00
parent 15990079ce
commit adc5363202
17 changed files with 114 additions and 106 deletions

View File

@@ -1374,7 +1374,7 @@ static VehicleEnterTileStatus VehicleEnter_TunnelBridge(Vehicle *v, TileIndex ti
vdir = DirToDiagDir(t->direction);
if (t->track != TRACK_BIT_WORMHOLE && dir == vdir) {
if (IsFrontEngine(t) && fc == _tunnel_fractcoord_1[dir]) {
if (t->IsFrontEngine() && fc == _tunnel_fractcoord_1[dir]) {
if (!PlayVehicleSound(t, VSE_TUNNEL) && RailVehInfo(t->engine_type)->engclass == 0) {
SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
}