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
commit02c99bdf66fe89c58bfac40bdf664f6bf907fc8b (patch)
tree5703d7774e7ee037106c7b152f4e493c4fdf9346 /src/ai
parent6c35825453699f7490c19198cd8cc9e56b299d0c (diff)
downloadopenttd-02c99bdf66fe89c58bfac40bdf664f6bf907fc8b.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)) {