mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #4510 from Gymnasiast/fix-4505
Clear angriness status when making guests happy, fixes #4505
This commit is contained in:
commit
46cf298e6e
|
@ -259,6 +259,12 @@ static void cheat_set_guest_parameter(int parameter, int value)
|
|||
switch(parameter) {
|
||||
case GUEST_PARAMETER_HAPPINESS:
|
||||
peep->happiness = value;
|
||||
// Clear the 'red-faced with anger' status if we're making the guest happy
|
||||
if (value > 0)
|
||||
{
|
||||
peep->peep_flags &= ~PEEP_FLAGS_ANGRY;
|
||||
peep->angriness = 0;
|
||||
}
|
||||
break;
|
||||
case GUEST_PARAMETER_ENERGY:
|
||||
peep->energy = value;
|
||||
|
|
|
@ -977,8 +977,8 @@ static void sub_68F41A(rct_peep *peep, int index)
|
|||
if (peep->nausea <= 130)peep->nausea = 130;
|
||||
}
|
||||
|
||||
if (peep->var_F3 != 0)
|
||||
peep->var_F3--;
|
||||
if (peep->angriness != 0)
|
||||
peep->angriness--;
|
||||
|
||||
if (peep->state == PEEP_STATE_WALKING || peep->state == PEEP_STATE_SITTING){
|
||||
peep->var_F2++;
|
||||
|
@ -5364,7 +5364,7 @@ static void peep_update_walking_break_scenery(rct_peep* peep){
|
|||
(map_element->base_height << 3) + 32,
|
||||
map_element->base_height << 3);
|
||||
|
||||
peep->var_F3 = 0x10;
|
||||
peep->angriness = 16;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -7031,7 +7031,7 @@ rct_peep *peep_generate(int x, int y, int z)
|
|||
peep->no_of_drinks = 0;
|
||||
peep->no_of_souvenirs = 0;
|
||||
peep->var_F2 = 0;
|
||||
peep->var_F3 = 0;
|
||||
peep->angriness = 0;
|
||||
peep->var_F4 = 0;
|
||||
|
||||
uint8 tshirt_colour = scenario_rand() % countof(tshirt_colours);
|
||||
|
@ -7297,7 +7297,7 @@ const int face_sprite_large[] = {
|
|||
static int get_face_sprite_offset(rct_peep *peep){
|
||||
|
||||
// ANGRY
|
||||
if (peep->var_F3) return PEEP_FACE_OFFSET_ANGRY;
|
||||
if (peep->angriness > 0) return PEEP_FACE_OFFSET_ANGRY;
|
||||
|
||||
// VERY_VERY_SICK
|
||||
if (peep->nausea > 200) return PEEP_FACE_OFFSET_VERY_VERY_SICK;
|
||||
|
|
|
@ -551,7 +551,7 @@ typedef struct rct_peep {
|
|||
uint8 voucher_type; // 0xF0
|
||||
uint8 voucher_arguments; // 0xF1 ride_id or string_offset_id
|
||||
uint8 var_F2;
|
||||
uint8 var_F3;
|
||||
uint8 angriness;
|
||||
uint8 var_F4;
|
||||
uint8 days_in_queue; // 0xF5
|
||||
uint8 balloon_colour; // 0xF6
|
||||
|
|
Loading…
Reference in New Issue