From 02c99bdf66fe89c58bfac40bdf664f6bf907fc8b Mon Sep 17 00:00:00 2001 From: michi_cc Date: Mon, 20 Oct 2008 19:35:48 +0000 Subject: (svn r14504) -Cleanup: Use the right variable type for tile offsets. --- src/ai/trolly/trolly.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ai/trolly') diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp index 23a67011b..17918b2ca 100644 --- a/src/ai/trolly/trolly.cpp +++ b/src/ai/trolly/trolly.cpp @@ -1057,7 +1057,7 @@ static void AiNew_State_BuildPath(Company *c) ret = AI_DoCommand(tile, DiagDirToRoadBits(ReverseDiagDir(dir1)), 0, DC_EXEC | DC_NO_WATER, CMD_BUILD_ROAD); if (CmdSucceeded(ret)) { - TileIndex offset = TileOffsByDiagDir(dir1); + TileIndexDiff offset = TileOffsByDiagDir(dir1); if (IsTileType(tile + offset, MP_CLEAR) || IsTileType(tile + offset, MP_TREES)) { ret = AI_DoCommand(tile + offset, AiNew_GetRoadDirection(tile, tile + offset, tile + offset + offset), 0, DC_EXEC | DC_NO_WATER, CMD_BUILD_ROAD); if (CmdSucceeded(ret)) { @@ -1069,7 +1069,7 @@ static void AiNew_State_BuildPath(Company *c) ret = AI_DoCommand(tile, DiagDirToRoadBits(ReverseDiagDir(dir2)), 0, DC_EXEC | DC_NO_WATER, CMD_BUILD_ROAD); if (CmdSucceeded(ret)) { - TileIndex offset = TileOffsByDiagDir(dir2); + TileIndexDiff offset = TileOffsByDiagDir(dir2); if (IsTileType(tile + offset, MP_CLEAR) || IsTileType(tile + offset, MP_TREES)) { ret = AI_DoCommand(tile + offset, AiNew_GetRoadDirection(tile, tile + offset, tile + offset + offset), 0, DC_EXEC | DC_NO_WATER, CMD_BUILD_ROAD); if (CmdSucceeded(ret)) { @@ -1081,7 +1081,7 @@ static void AiNew_State_BuildPath(Company *c) ret = AI_DoCommand(tile, DiagDirToRoadBits(dir3), 0, DC_EXEC | DC_NO_WATER, CMD_BUILD_ROAD); if (CmdSucceeded(ret)) { - TileIndex offset = TileOffsByDiagDir(dir3); + TileIndexDiff offset = TileOffsByDiagDir(dir3); if (IsTileType(tile + offset, MP_CLEAR) || IsTileType(tile + offset, MP_TREES)) { ret = AI_DoCommand(tile + offset, AiNew_GetRoadDirection(tile, tile + offset, tile + offset + offset), 0, DC_EXEC | DC_NO_WATER, CMD_BUILD_ROAD); if (CmdSucceeded(ret)) { -- cgit v1.2.3-70-g09d2