summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/roadveh_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 0927c69a9..c7bcffc77 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1682,8 +1682,8 @@ again:
uint turn_around_start_frame = RVC_TURN_AROUND_START_FRAME;
- RoadBits tram = GetRoadBits(v->tile, ROADTYPE_TRAM);
- if (v->u.road.roadtype == ROADTYPE_TRAM && CountBits(tram) == 1) {
+ RoadBits tram;
+ if (v->u.road.roadtype == ROADTYPE_TRAM && CountBits(tram = GetRoadBits(v->tile, ROADTYPE_TRAM)) == 1) {
/*
* The tram is turning around with one tram 'roadbit'. This means that
* it is using the 'big' corner 'drive data'. However, to support the