(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
DiagDirections, and add TileOffsByDir that handles Directions. -Codechange: Make the treeloop use TileOffsByDir().
This commit is contained in:
@@ -1558,7 +1558,7 @@ static bool SignalVehicleCheck(TileIndex tile, uint track)
|
||||
// now check all tiles from start to end for a "hidden" vehicle
|
||||
// NOTE: the hashes for tiles may overlap, so this could maybe be optimised a bit by not checking every tile?
|
||||
dest.track = 0x40; // trackbit for vehicles "hidden" inside a tunnel
|
||||
for (; tile != end; tile += TileOffsByDir(direction)) {
|
||||
for (; tile != end; tile += TileOffsByDiagDir(direction)) {
|
||||
if (VehicleFromPos(tile, &dest, SignalVehicleCheckProc) != NULL)
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user