(svn r9381) [NoAI] -Fix: inconsistency between documentation and actual behaviour (Zuu). noai
authorrubidium
Tue, 20 Mar 2007 21:07:54 +0000
branchnoai
changeset 9503 821422c9ca59
parent 9502 5eb285182114
child 9504 de4993fa3d98
(svn r9381) [NoAI] -Fix: inconsistency between documentation and actual behaviour (Zuu).
src/ai/api/ai_road.cpp
src/ai/api/ai_road.hpp
--- a/src/ai/api/ai_road.cpp	Tue Mar 20 20:19:48 2007 +0000
+++ b/src/ai/api/ai_road.cpp	Tue Mar 20 21:07:54 2007 +0000
@@ -36,7 +36,7 @@
 	return this->DoCommand(tile, entrance_dir, 0, CMD_BUILD_ROAD_DEPOT);
 }
 
-bool AIRoad::BuildRoadStation(TileIndex tile, TileIndex front, bool bus, bool drive_through)
+bool AIRoad::BuildRoadStation(TileIndex tile, TileIndex front, bool truck, bool drive_through)
 {
 	/* Outside of the map */
 	if (tile >= _map_size || tile == front) return false;
@@ -48,7 +48,7 @@
 		entrance_dir = (TileX(tile) == TileX(front)) ? (TileY(tile) < TileY(front) ? 3 : 1) : (TileX(tile) < TileX(front) ? 2: 0);
 	}
 
-	return this->DoCommand(tile, entrance_dir, drive_through << 1 | bus, CMD_BUILD_ROAD_STOP);
+	return this->DoCommand(tile, entrance_dir, drive_through << 1 | truck, CMD_BUILD_ROAD_STOP);
 }
 
 bool AIRoad::RemoveRoad(TileIndex start, TileIndex end)
--- a/src/ai/api/ai_road.hpp	Tue Mar 20 20:19:48 2007 +0000
+++ b/src/ai/api/ai_road.hpp	Tue Mar 20 21:07:54 2007 +0000
@@ -61,14 +61,14 @@
 	 * @param tile  place to build the depot.
 	 * @param front the tile exactly in front of the station.
 	 *   For drive-through stations either entrance side can be used.
-	 * @param bus   whether to build a bus or truck station.
+	 * @param truck whether to build a truck (true) or bus (false) station.
 	 * @param drive_through whether to make the station drive through or not.
 	 * @pre tile is always positive and smaller than AIMap::GetMapSize().
 	 * @pre front is always positive and smaller than AIMap::GetMapSize().
 	 * @pre tile is not equal to front
 	 * @return whether the station has been/can be build or not.
 	 */
-	bool BuildRoadStation(TileIndex tile, TileIndex front, bool bus, bool drive_through);
+	bool BuildRoadStation(TileIndex tile, TileIndex front, bool truck, bool drive_through);
 
 	/**
 	 * Removes a road from the center of tile start to the