diff options
author | michi_cc <michi_cc@openttd.org> | 2008-10-20 19:35:48 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2008-10-20 19:35:48 +0000 |
commit | 9c6541c80bce7543453ed9c9972ce71060894377 (patch) | |
tree | 5703d7774e7ee037106c7b152f4e493c4fdf9346 /src/ai/trolly | |
parent | c03d4d5f49770eabe21687c062931c27108bc361 (diff) | |
download | openttd-9c6541c80bce7543453ed9c9972ce71060894377.tar.xz |
(svn r14504) -Cleanup: Use the right variable type for tile offsets.
Diffstat (limited to 'src/ai/trolly')
-rw-r--r-- | src/ai/trolly/trolly.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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)) { |