Merge pull request #987 from Gymnasiast/patch-2

Fix #986
This commit is contained in:
Ted John 2015-04-16 09:19:00 +01:00
commit ed0c3a9490
3 changed files with 6 additions and 9 deletions

View File

@ -198,8 +198,8 @@ void peep_check_if_lost(rct_peep* peep){
peep->var_F4 = 230;
}
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_LOST, 0xFF);
if (peep->happiness_growth_rate < 30) peep->happiness_growth_rate = 0;
else peep->happiness_growth_rate -= 30;
peep->happiness_growth_rate = max(peep->happiness_growth_rate - 30, 0);
}
/* rct2: 0x69C26B
@ -211,8 +211,7 @@ void peep_check_cant_find_ride(rct_peep* peep){
if (peep->var_C6 == 30 || peep->var_C6 == 60){
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_CANT_FIND, peep->guest_heading_to_ride_id);
if (peep->happiness_growth_rate < 30) peep->happiness_growth_rate = 0;
else peep->happiness_growth_rate -= 30;
peep->happiness_growth_rate = max(peep->happiness_growth_rate - 30, 0);
}
peep->var_C6--;
@ -237,8 +236,7 @@ void peep_check_cant_find_exit(rct_peep* peep){
if (peep->var_C6 == 1){
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_CANT_FIND_EXIT, 0xFF);
if (peep->happiness_growth_rate < 30) peep->happiness_growth_rate = 0;
else peep->happiness_growth_rate -= 30;
peep->happiness_growth_rate = max(peep->happiness_growth_rate - 30, 0);
}
if (--peep->var_C6 == 0) peep->var_C6 = 90;

View File

@ -389,7 +389,7 @@ typedef struct {
uint8 energy; // 0x38
uint8 energy_growth_rate; // 0x39
uint8 happiness; // 0x3A
sint8 happiness_growth_rate; // 0x3B
uint8 happiness_growth_rate; // 0x3B
uint8 nausea; // 0x3C
uint8 nausea_growth_rate; // 0x3D
uint8 hunger; // 0x3E

View File

@ -1237,8 +1237,7 @@ void window_guest_overview_tool_down(){
peep->action_sprite_type = 0xFF;
peep->var_C4 = 0;
peep->happiness_growth_rate -= 10;
if (peep->happiness_growth_rate < 0)peep->happiness_growth_rate = 0;
peep->happiness_growth_rate = max(peep->happiness_growth_rate - 10, 0);
sub_693B58(peep);
tool_cancel();