forked from mirror/OpenTTD
(svn r1568) made an enum of train subtypes to make the code more readable
This commit is contained in:
@@ -1413,7 +1413,7 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, uint tile, int x, int y)
|
||||
vdir = v->direction >> 1;
|
||||
|
||||
if (v->u.rail.track != 0x40 && dir == vdir) {
|
||||
if (v->subtype == 0 && fc == _tunnel_fractcoord_1[dir]) {
|
||||
if (v->subtype == TS_Front_Engine && fc == _tunnel_fractcoord_1[dir]) {
|
||||
if (v->spritenum < 4)
|
||||
SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
|
||||
return 0;
|
||||
@@ -1465,7 +1465,7 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, uint tile, int x, int y)
|
||||
}
|
||||
}
|
||||
} else if (_map5[tile] & 0x80) {
|
||||
if (v->type == VEH_Road || (v->type == VEH_Train && v->subtype == 0)) {
|
||||
if (v->type == VEH_Road || (v->type == VEH_Train && v->subtype == TS_Front_Engine)) {
|
||||
if (GetTileSlope(tile, &h) != 0)
|
||||
h += 8; // Compensate for possible foundation
|
||||
if (!(_map5[tile] & 0x40) || // start/end tile of bridge
|
||||
|
Reference in New Issue
Block a user