(svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits

This commit is contained in:
smatz
2008-05-14 18:31:21 +00:00
parent 56f15b3544
commit ec627dedf8
12 changed files with 63 additions and 32 deletions

View File

@@ -2198,7 +2198,7 @@ static void AiBuildRailConstruct(Player *p)
int32 bridge_len = GetTunnelBridgeLength(t1, t2);
DiagDirection dir = (TileX(t1) == TileX(t2) ? DIAGDIR_SE : DIAGDIR_SW);
Track track = AxisToTrack(DiagDirToAxis(dir));
Track track = DiagDirToDiagTrack(dir);
if (t2 < t1) dir = ReverseDiagDir(dir);