summaryrefslogtreecommitdiff
path: root/src/roadveh_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/roadveh_gui.cpp')
-rw-r--r--src/roadveh_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index 029234c26..0cbaee06c 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -31,9 +31,7 @@
*/
void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
{
- const RoadVehicle *rv = RoadVehicle::From(v);
-
- uint y_offset = rv->HasArticulatedPart() ? 15 : 0; // Draw the first line below the sprite of an articulated RV instead of after it.
+ uint y_offset = v->HasArticulatedPart() ? 15 : 0; // Draw the first line below the sprite of an articulated RV instead of after it.
StringID str;
Money feeder_share = 0;
@@ -42,7 +40,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
SetDParam(2, v->value);
DrawString(left, right, y + y_offset, STR_VEHICLE_INFO_BUILT_VALUE, TC_FROMSTRING, SA_LEFT | SA_STRIP);
- if (rv->HasArticulatedPart()) {
+ if (v->HasArticulatedPart()) {
CargoArray max_cargo;
StringID subtype_text[NUM_CARGO];
char capacity[512];