summaryrefslogtreecommitdiff
path: root/src/ai/trolly/pathfinder.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-30 20:39:50 +0000
committerrubidium <rubidium@openttd.org>2008-09-30 20:39:50 +0000
commit3b798599b63067c2e92aa49906ea66a07ae8de44 (patch)
tree69fb7ae1d9bdadb9e7386cb70b0a26621ad9b57f /src/ai/trolly/pathfinder.cpp
parentcc1e761edab14f8264dba44d09f7272d931bdd93 (diff)
downloadopenttd-3b798599b63067c2e92aa49906ea66a07ae8de44.tar.xz
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
Diffstat (limited to 'src/ai/trolly/pathfinder.cpp')
-rw-r--r--src/ai/trolly/pathfinder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp
index dbb43fc55..258243f23 100644
--- a/src/ai/trolly/pathfinder.cpp
+++ b/src/ai/trolly/pathfinder.cpp
@@ -24,21 +24,21 @@
// TODO: make it train compatible
static bool TestCanBuildStationHere(TileIndex tile, byte dir)
{
- Player *p = GetPlayer(_current_player);
+ Company *c = GetCompany(_current_company);
if (dir == TEST_STATION_NO_DIR) {
CommandCost ret;
// 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, _players_ainew[p->index].tbt, tile, 1, 1, dir, DC_QUERY_COST);
+ ret = AiNew_Build_Station(c, _companies_ainew[c->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, _players_ainew[p->index].tbt, tile, 1, 1, dir, DC_QUERY_COST));
+ return CmdSucceeded(AiNew_Build_Station(c, _companies_ainew[c->index].tbt, tile, 1, 1, dir, DC_QUERY_COST));
}