1
0
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:
IntelOrca
2016-03-07 21:34:26 +00:00
parent 072aaa1451
commit b8edcd50e1
2 changed files with 7 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;