summaryrefslogtreecommitdiff
path: root/ai/trolly/trolly.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-21 07:41:54 +0000
committertron <tron@openttd.org>2006-02-21 07:41:54 +0000
commit4b468837515a1f34476a00bbe49de9d9430d12de (patch)
tree303bf7eabc1a6e7dca232689dd5a11219f226a6d /ai/trolly/trolly.c
parent35fb17947a4432b32ebe0b035b744d63b4d3a146 (diff)
downloadopenttd-4b468837515a1f34476a00bbe49de9d9430d12de.tar.xz
(svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL)
Diffstat (limited to 'ai/trolly/trolly.c')
-rw-r--r--ai/trolly/trolly.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ai/trolly/trolly.c b/ai/trolly/trolly.c
index 20aa3594c..c46324cd0 100644
--- a/ai/trolly/trolly.c
+++ b/ai/trolly/trolly.c
@@ -840,10 +840,8 @@ static void AiNew_State_FindDepot(Player *p)
// Is the terrain clear?
if (IsTileType(tile + TileOffsByDir(j), MP_CLEAR) ||
IsTileType(tile + TileOffsByDir(j), MP_TREES)) {
- TileInfo ti;
- FindLandscapeHeightByTile(&ti, tile);
// If the current tile is on a slope (tileh != 0) then we do not allow this
- if (ti.tileh != 0) continue;
+ if (GetTileSlope(tile, NULL) != 0) continue;
// Check if everything went okay..
r = AiNew_Build_Depot(p, tile + TileOffsByDir(j), j ^ 2, 0);
if (CmdFailed(r)) continue;