summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2008-10-20 19:35:48 +0000
committermichi_cc <michi_cc@openttd.org>2008-10-20 19:35:48 +0000
commit9c6541c80bce7543453ed9c9972ce71060894377 (patch)
tree5703d7774e7ee037106c7b152f4e493c4fdf9346 /src/ai
parentc03d4d5f49770eabe21687c062931c27108bc361 (diff)
downloadopenttd-9c6541c80bce7543453ed9c9972ce71060894377.tar.xz
(svn r14504) -Cleanup: Use the right variable type for tile offsets.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/trolly/trolly.cpp6
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)) {