Merge branch 'master' into jgrpp

# Conflicts:
#	src/economy.cpp
#	src/linkgraph/refresh.cpp
#	src/order_cmd.cpp
#	src/saveload/vehicle_sl.cpp
#	src/station.cpp
#	src/station_base.h
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2022-03-04 18:17:44 +00:00
37 changed files with 296 additions and 245 deletions

View File

@@ -1759,7 +1759,7 @@ static void DrawSmallOrderList(const Vehicle *v, int left, int right, int y, uin
oid++;
order = order->next;
if (order == nullptr) {
order = v->orders.list->GetFirstOrder();
order = v->orders->GetFirstOrder();
oid = 0;
}
} while (oid != start);
@@ -4151,6 +4151,7 @@ void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
int total_width = 0;
int y_offset = 0;
bool rotor_seq = false; // Whether to draw the rotor of the vehicle in this step.
bool is_ground_vehicle = v->IsGroundVehicle();
while (v != nullptr) {
if (total_width >= ScaleGUITrad(2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH)) break;
@@ -4186,10 +4187,13 @@ void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
}
}
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;
if (is_ground_vehicle) {
/* Center trains and road vehicles on the front vehicle */
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;
}
}
UpdateCursorSize();