summaryrefslogtreecommitdiff
path: root/src/script/api/script_tunnel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/script_tunnel.cpp')
-rw-r--r--src/script/api/script_tunnel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_tunnel.cpp b/src/script/api/script_tunnel.cpp
index a8bfcbfd3..ce94c17ee 100644
--- a/src/script/api/script_tunnel.cpp
+++ b/src/script/api/script_tunnel.cpp
@@ -90,7 +90,7 @@ static void _DoCommandReturnBuildTunnel1(class ScriptInstance *instance)
uint type = 0;
if (vehicle_type == ScriptVehicle::VT_ROAD) {
type |= (TRANSPORT_ROAD << 8);
- type |= ::RoadTypeToRoadTypes((::RoadType)ScriptObject::GetRoadType());
+ type |= ScriptRoad::GetCurrentRoadType();
} else {
type |= (TRANSPORT_RAIL << 8);
type |= ScriptRail::GetCurrentRailType();