(svn r21141) -Codechange: Use the new 'frame' variable for the bridge entry code as well (Hirundo)

This commit is contained in:
rubidium 2010-11-10 23:16:28 +00:00
parent b50aeb9552
commit 65e6c9fd12
1 changed files with 2 additions and 7 deletions

View File

@ -1592,13 +1592,8 @@ static VehicleEnterTileStatus VehicleEnter_TunnelBridge(Vehicle *v, TileIndex ti
}
if (vdir == dir) {
switch (dir) {
default: NOT_REACHED();
case DIAGDIR_NE: if ((x & 0xF) != 0) return VETSB_CONTINUE; break;
case DIAGDIR_SE: if ((y & 0xF) != TILE_SIZE - 1) return VETSB_CONTINUE; break;
case DIAGDIR_SW: if ((x & 0xF) != TILE_SIZE - 1) return VETSB_CONTINUE; break;
case DIAGDIR_NW: if ((y & 0xF) != 0) return VETSB_CONTINUE; break;
}
/* Vehicle enters bridge at the last frame inside this tile. */
if (frame != TILE_SIZE - 1) return VETSB_CONTINUE;
switch (v->type) {
case VEH_TRAIN: {
Train *t = Train::From(v);