summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2021-02-27 13:55:33 +0100
committerMichael Lutz <michi@icosahedron.de>2021-02-27 14:52:11 +0100
commitd236c576008da14669c33ba4b628c81e4e486ec1 (patch)
tree3dd55c70d2f7da3331b4eb6dfa575f0770a17c6f
parentef4cec9382f7992d625f4c37daec20b63643ec05 (diff)
downloadopenttd-d236c576008da14669c33ba4b628c81e4e486ec1.tar.xz
Fix: yet another place where the vehicle-cursor did not account for the interface zoom level.
-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 b44afcc51..8e2088815 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -3171,7 +3171,7 @@ void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
total_width += GetSingleVehicleWidth(v, image_type);
}
- int offs = ((int)VEHICLEINFO_FULL_VEHICLE_WIDTH - total_width) / 2;
+ int offs = (ScaleGUITrad(VEHICLEINFO_FULL_VEHICLE_WIDTH) - total_width) / 2;
if (rtl) offs = -offs;
for (uint i = 0; i < _cursor.sprite_count; ++i) {
_cursor.sprite_pos[i].x += offs;