summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_engine.cpp')
-rw-r--r--src/ai/api/ai_engine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp
index 3793b748c..d24a8b6e0 100644
--- a/src/ai/api/ai_engine.cpp
+++ b/src/ai/api/ai_engine.cpp
@@ -148,7 +148,7 @@
/* static */ int32 AIEngine::GetPower(EngineID engine_id)
{
if (!IsValidEngine(engine_id)) return -1;
- if (GetVehicleType(engine_id) != AIVehicle::VT_RAIL) return -1;
+ if (GetVehicleType(engine_id) != AIVehicle::VT_RAIL && GetVehicleType(engine_id) != AIVehicle::VT_ROAD) return -1;
if (IsWagon(engine_id)) return -1;
return ::Engine::Get(engine_id)->GetPower();
@@ -157,7 +157,7 @@
/* static */ int32 AIEngine::GetWeight(EngineID engine_id)
{
if (!IsValidEngine(engine_id)) return -1;
- if (GetVehicleType(engine_id) != AIVehicle::VT_RAIL) return -1;
+ if (GetVehicleType(engine_id) != AIVehicle::VT_RAIL && GetVehicleType(engine_id) != AIVehicle::VT_ROAD) return -1;
return ::Engine::Get(engine_id)->GetDisplayWeight();
}
@@ -165,7 +165,7 @@
/* static */ int32 AIEngine::GetMaxTractiveEffort(EngineID engine_id)
{
if (!IsValidEngine(engine_id)) return -1;
- if (GetVehicleType(engine_id) != AIVehicle::VT_RAIL) return -1;
+ if (GetVehicleType(engine_id) != AIVehicle::VT_RAIL && GetVehicleType(engine_id) != AIVehicle::VT_ROAD) return -1;
if (IsWagon(engine_id)) return -1;
return ::Engine::Get(engine_id)->GetDisplayMaxTractiveEffort();