ship_cmd.c
changeset 1901 03bf9bf99319
parent 1891 862800791170
child 1926 530480d14685
equal deleted inserted replaced
1900:1f3309a61546 1901:03bf9bf99319
   874 	if (flags & DC_QUERY_COST) return value;
   874 	if (flags & DC_QUERY_COST) return value;
   875 
   875 
   876 	/* The ai_new queries the vehicle cost before building the route,
   876 	/* The ai_new queries the vehicle cost before building the route,
   877 	 * so we must check against cheaters no sooner than now. --pasky */
   877 	 * so we must check against cheaters no sooner than now. --pasky */
   878 	if (!IsTileDepotType(tile, TRANSPORT_WATER)) return CMD_ERROR;
   878 	if (!IsTileDepotType(tile, TRANSPORT_WATER)) return CMD_ERROR;
   879 	if (_map_owner[tile] != _current_player) return CMD_ERROR;
   879 	if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
   880 
   880 
   881 	v = AllocateVehicle();
   881 	v = AllocateVehicle();
   882 	if (v == NULL || IsOrderPoolFull() ||
   882 	if (v == NULL || IsOrderPoolFull() ||
   883 			(unit_num = GetFreeUnitNumber(VEH_Ship)) > _patches.max_ships)
   883 			(unit_num = GetFreeUnitNumber(VEH_Ship)) > _patches.max_ships)
   884 		return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
   884 		return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);