summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 11:30:37 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 11:30:37 +0000
commit19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3 (patch)
treee0fd85356bbcae38f6b50b8e7bc9470156b81e2d /src/ai/api
parent643c54d288e091adf386bacd3615991e24e8909f (diff)
downloadopenttd-19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3.tar.xz
(svn r23106) -Codechange: pass int* to GetTileSlope and friends
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_tile.cpp2
-rw-r--r--src/ai/api/ai_tunnel.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_tile.cpp b/src/ai/api/ai_tile.cpp
index 677c845a3..b07c7cbf5 100644
--- a/src/ai/api/ai_tile.cpp
+++ b/src/ai/api/ai_tile.cpp
@@ -170,7 +170,7 @@
{
if (!::IsValidTile(tile) || !::IsValidCorner((::Corner)corner)) return -1;
- uint z;
+ int z;
::Slope slope = ::GetTileSlope(tile, &z);
return (z + ::GetSlopeZInCorner(slope, (::Corner)corner));
}
diff --git a/src/ai/api/ai_tunnel.cpp b/src/ai/api/ai_tunnel.cpp
index 99aec30c4..310a751af 100644
--- a/src/ai/api/ai_tunnel.cpp
+++ b/src/ai/api/ai_tunnel.cpp
@@ -29,13 +29,13 @@
/* If it's a tunnel already, take the easy way out! */
if (IsTunnelTile(tile)) return ::GetOtherTunnelEnd(tile);
- uint start_z;
+ int start_z;
Slope start_tileh = ::GetTileSlope(tile, &start_z);
DiagDirection direction = ::GetInclinedSlopeDirection(start_tileh);
if (direction == INVALID_DIAGDIR) return INVALID_TILE;
TileIndexDiff delta = ::TileOffsByDiagDir(direction);
- uint end_z;
+ int end_z;
do {
tile += delta;
if (!::IsValidTile(tile)) return INVALID_TILE;