Mercurial > hg > openttd
changeset 19673:548dddbcada1 draft
(svn r24582) -Fix (r24581): Order distances are not supposed to be compared to map distances
author | planetmaker <planetmaker@openttd.org> |
---|---|
date | Tue, 09 Oct 2012 20:59:29 +0000 |
parents | 322d66c989f6 |
children | 5fea2a96c9e8 |
files | src/script/api/script_engine.hpp src/script/api/script_order.hpp src/script/api/script_vehicle.hpp |
diffstat | 3 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/script/api/script_engine.hpp +++ b/src/script/api/script_engine.hpp @@ -257,8 +257,10 @@ * Get the maximum allowed distance between two orders for an engine. * @param engine_id The engine to get the max distance for. * @pre IsValidEngine(engine_id). - * @return The square of the maximum distance between two orders for - * the engine or 0 if the distance is unlimited. + * @return The maximum distance between two orders for the engine + * or 0 if the distance is unlimited. + * @note The unit of the order distances is unspecified and should + * not be compared with map distances * @see ScriptOrder::GetOrderDistance */ static uint GetMaximumOrderDistance(EngineID engine_id);
--- a/src/script/api/script_order.hpp +++ b/src/script/api/script_order.hpp @@ -588,8 +588,10 @@ * @param vehicle_type The vehicle type to get the distance for. * @param origin_tile Origin, can be any tile or a tile of a specific station. * @param dest_tile Destination, ca be any tile or a tile of a specific station. - * @return The square of the distance between the origin and the - * destination for a vehicle of the given vehicle type. + * @return The distance between the origin and the destination for a + * vehicle of the given vehicle type. + * @note The unit of the order distances is unspecified and should + * not be compared with map distances * @see ScriptEngine::GetMaximumOrderDistance and ScriptVehicle::GetMaximumOrderDistance */ static uint GetOrderDistance(ScriptVehicle::VehicleType vehicle_type, TileIndex origin_tile, TileIndex dest_tile);
--- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -551,8 +551,10 @@ * Get the maximum allowed distance between two orders for a vehicle. * @param vehicle_id The vehicle to get the distance for. * @pre IsValidVehicle(vehicle_id). - * @return The square of the maximum distance between two orders for - * this vehicle or 0 if the distance is unlimited. + * @return The maximum distance between two orders for this vehicle + * or 0 if the distance is unlimited. + * @note The unit of the order distances is unspecified and should + * not be compared with map distances * @see ScriptOrder::GetOrderDistance */ static uint GetMaximumOrderDistance(VehicleID vehicle_id);