summaryrefslogtreecommitdiff
path: root/src/ai/trolly/pathfinder.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-09 16:40:02 +0000
committerrubidium <rubidium@openttd.org>2008-01-09 16:40:02 +0000
commitb4337eba83e34ddaac29684d78202ae9623e9240 (patch)
tree9569d5da425e71768a78a6ffdbad415f3fb38811 /src/ai/trolly/pathfinder.cpp
parenta27a240b879ab555f36695ba30c9dea0e2a6817e (diff)
downloadopenttd-b4337eba83e34ddaac29684d78202ae9623e9240.tar.xz
(svn r11792) -Codechange: move some (virtually) globally included AI related structs to a place where they are only included a few times.
Diffstat (limited to 'src/ai/trolly/pathfinder.cpp')
-rw-r--r--src/ai/trolly/pathfinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp
index c670c0eae..945691675 100644
--- a/src/ai/trolly/pathfinder.cpp
+++ b/src/ai/trolly/pathfinder.cpp
@@ -27,14 +27,14 @@ static bool TestCanBuildStationHere(TileIndex tile, byte dir)
// TODO: currently we only allow spots that can be access from al 4 directions...
// should be fixed!!!
for (dir = 0; dir < 4; dir++) {
- ret = AiNew_Build_Station(p, p->ainew.tbt, tile, 1, 1, dir, DC_QUERY_COST);
+ ret = AiNew_Build_Station(p, _players_ainew[p->index].tbt, tile, 1, 1, dir, DC_QUERY_COST);
if (CmdSucceeded(ret)) return true;
}
return false;
}
// return true if command succeeded, so the inverse of CmdFailed()
- return CmdSucceeded(AiNew_Build_Station(p, p->ainew.tbt, tile, 1, 1, dir, DC_QUERY_COST));
+ return CmdSucceeded(AiNew_Build_Station(p, _players_ainew[p->index].tbt, tile, 1, 1, dir, DC_QUERY_COST));
}