(svn r8701) -Codechange: replace magic numbers with enums for u.rail.track.

This commit is contained in:
rubidium
2007-02-13 10:46:45 +00:00
parent af3001b988
commit 4ec7eb2201
7 changed files with 38 additions and 38 deletions

View File

@@ -1275,7 +1275,7 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y
dir = GetTunnelDirection(tile);
vdir = DirToDiagDir(v->direction);
if (v->u.rail.track != 0x40 && dir == vdir) {
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) {
SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
@@ -1360,7 +1360,7 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y
} else if (DirToDiagDir(v->direction) == ReverseDiagDir(dir)) {
v->tile = tile;
if (v->type == VEH_Train) {
if (v->u.rail.track == 0x40) {
if (v->u.rail.track == TRACK_BIT_WORMHOLE) {
v->u.rail.track = (DiagDirToAxis(dir) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y);
return VETSB_ENTERED_WORMHOLE;
}