summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2021-02-23 22:56:01 +0100
committerCharles Pigott <charlespigott@googlemail.com>2021-02-24 08:00:42 +0000
commit79c2b81ffdebe182280ac514ca77ddf406f0331f (patch)
tree4bdb74de6e39d8b074b22b0a5005df2f369f6b70 /src
parent46e13313e4eada30a8aef857731e0a12664e02d1 (diff)
downloadopenttd-79c2b81ffdebe182280ac514ca77ddf406f0331f.tar.xz
Fix: vehicle-cursor size-limit did not account for the interface zoom level.
Diffstat (limited to 'src')
-rw-r--r--src/vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index d28849ebd..b44afcc51 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -3151,7 +3151,7 @@ void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
_cursor.sprite_count = 0;
int total_width = 0;
for (; v != nullptr; v = v->HasArticulatedPart() ? v->GetNextArticulatedPart() : nullptr) {
- if (total_width >= 2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH) break;
+ if (total_width >= ScaleGUITrad(2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH)) break;
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
VehicleSpriteSeq seq;