mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 01:52:32 +01:00
fix #3107: Number of sold items is reset after some time
Number of sold items was being overwritten by a memmove on the field before it. Queue time changed to only be drawn for rides.
This commit is contained in:
@@ -2146,7 +2146,7 @@ static void ride_breakdown_update(int rideIndex)
|
||||
ride->downtime_history[7];
|
||||
ride->downtime = min(totalDowntime / 2, 100);
|
||||
|
||||
memmove(&ride->downtime_history[1], ride->downtime_history, sizeof(ride->downtime_history));
|
||||
memmove(&ride->downtime_history[1], ride->downtime_history, sizeof(ride->downtime_history) - 1);
|
||||
|
||||
ride->downtime_history[0] = 0;
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE;
|
||||
|
||||
@@ -6065,10 +6065,12 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
y += 10;
|
||||
|
||||
// Queue time
|
||||
queueTime = ride_get_max_queue_time(ride);
|
||||
stringId = queueTime == 1 ? STR_QUEUE_TIME_MINUTE : STR_QUEUE_TIME_MINUTES;
|
||||
y += gfx_draw_string_left_wrapped(dpi, &queueTime, x, y, 308, stringId, 0);
|
||||
y += 5;
|
||||
if (gRideClassifications[ride->type] == RIDE_CLASS_RIDE) {
|
||||
queueTime = ride_get_max_queue_time(ride);
|
||||
stringId = queueTime == 1 ? STR_QUEUE_TIME_MINUTE : STR_QUEUE_TIME_MINUTES;
|
||||
y += gfx_draw_string_left_wrapped(dpi, &queueTime, x, y, 308, stringId, 0);
|
||||
y += 5;
|
||||
}
|
||||
|
||||
// Primary shop items sold
|
||||
shopItem = get_ride_entry_by_ride(ride)->shop_item;
|
||||
|
||||
Reference in New Issue
Block a user