diff options
author | bjarni <bjarni@openttd.org> | 2005-01-19 19:15:03 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-01-19 19:15:03 +0000 |
commit | 2fd3553d78d6b93fb85d97ae8e98beef5418a9c4 (patch) | |
tree | 2bf58365c54d2375ef13ac173631a7846771dc03 /tunnelbridge_cmd.c | |
parent | e4a3d284b21a5bbd4ff5c0ad920be28cd4701e8a (diff) | |
download | openttd-2fd3553d78d6b93fb85d97ae8e98beef5418a9c4.tar.xz |
(svn r1568) made an enum of train subtypes to make the code more readable
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 72df2304f..307ab5aee 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -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 |