diff src/roadveh_cmd.cpp @ 8961:b33bcd7fa037 draft

(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
author smatz <smatz@openttd.org>
date Thu, 17 Apr 2008 18:24:45 +0000 (2008-04-17)
parents 454ba10a0cff
children 322e2779f67a
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -178,7 +178,7 @@
 
 	/* The ai_new queries the vehicle cost before building the route,
 	 * so we must check against cheaters no sooner than now. --pasky */
-	if (!IsDepotTypeTile(tile, TRANSPORT_ROAD)) return CMD_ERROR;
+	if (!IsRoadDepotTile(tile)) return CMD_ERROR;
 	if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
 
 	if (HasTileRoadType(tile, ROADTYPE_TRAM) != HasBit(EngInfo(p1)->misc_flags, EF_ROAD_TRAM)) return_cmd_error(STR_DEPOT_WRONG_DEPOT_TYPE);
@@ -340,7 +340,7 @@
 {
 	TileIndex tile = v->tile;
 
-	if (!IsDepotTypeTile(tile, TRANSPORT_ROAD)) return false;
+	if (!IsRoadDepotTile(tile)) return false;
 	if (IsRoadVehFront(v) && !(v->vehstatus & VS_STOPPED)) return false;
 
 	for (; v != NULL; v = v->Next()) {