mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #1124 from jcdavis/69A3A2
69A3A2: ride_update_satisfaction
This commit is contained in:
commit
25c5c8cbaa
|
@ -2517,7 +2517,7 @@ static void peep_update_ride_sub_state_21(rct_peep* peep){
|
|||
ride->total_customers++;
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER;
|
||||
|
||||
RCT2_CALLPROC_X(0x0069A3A2, 0, peep->happiness / 64, 0, 0, 0, peep->current_ride * sizeof(rct_ride), 0);
|
||||
ride_update_satisfaction(ride, peep->happiness / 64);
|
||||
}
|
||||
|
||||
/* rct2: 0x691A30
|
||||
|
|
|
@ -1360,6 +1360,23 @@ static void ride_chairlift_update(rct_ride *ride)
|
|||
map_invalidate_tile(x, y, z, z + (4 * 8));
|
||||
}
|
||||
|
||||
/**
|
||||
* rct2: 0x0069A3A2
|
||||
* edi: ride (in code as bytes offset from start of rides list)
|
||||
* bl: happiness
|
||||
*/
|
||||
void ride_update_satisfaction(rct_ride* ride, uint8 happiness) {
|
||||
ride->satisfaction_next += happiness;
|
||||
ride->satisfaction_time_out++;
|
||||
if (ride->satisfaction_time_out >= 20) {
|
||||
ride->satisfaction = ride->satisfaction_next >> 2;
|
||||
ride->satisfaction_next = 0;
|
||||
ride->satisfaction_time_out = 0;
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* rct2: 0x0069A3D7
|
||||
* Updates the ride popularity
|
||||
* edi : ride
|
||||
|
|
|
@ -731,6 +731,7 @@ void reset_all_ride_build_dates();
|
|||
void ride_update_favourited_stat();
|
||||
void ride_update_all();
|
||||
void ride_check_all_reachable();
|
||||
void ride_update_satisfaction(rct_ride* ride, uint8 happiness);
|
||||
void ride_update_popularity(rct_ride* ride, uint8 pop_amount);
|
||||
int sub_6CAF80(int rideIndex, rct_xy_element *output);
|
||||
int track_get_next(rct_xy_element *input, rct_xy_element *output);
|
||||
|
|
Loading…
Reference in New Issue