forked from rosebudai/OpenRCT2-Web
Change min energy cheat to the correct min value 32.
Change min energy cheat to the correct min value 32. This fixes the issue with the min energy cheat that causes it to reset to 255 a few seconds after applying it.
This commit is contained in:
1 parent
d224f1219e
commit
ce0650daf5
3 files changed
+4
-3
No files matched your search
@@ -614,7 +614,7 @@ static void window_cheats_guests_mouseup(rct_window *w, rct_widgetindex widgetIn
|
||||
game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SETGUESTPARAMETER, GUEST_PARAMETER_ENERGY, GAME_COMMAND_CHEAT, PEEP_MAX_ENERGY, 0);
|
||||
break;
|
||||
case WIDX_GUEST_ENERGY_MIN:
|
||||
game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SETGUESTPARAMETER, GUEST_PARAMETER_ENERGY, GAME_COMMAND_CHEAT, 0, 0);
|
||||
game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SETGUESTPARAMETER, GUEST_PARAMETER_ENERGY, GAME_COMMAND_CHEAT, PEEP_MIN_ENERGY, 0);
|
||||
break;
|
||||
case WIDX_GUEST_HUNGER_MAX:
|
||||
game_do_command(0, GAME_COMMAND_FLAG_APPLY, CHEAT_SETGUESTPARAMETER, GUEST_PARAMETER_HUNGER, GAME_COMMAND_CHEAT, 0, 0);
|
||||
|
||||
@@ -1397,8 +1397,8 @@ static void sub_68F41A(rct_peep * peep, sint32 index)
|
||||
energy = energy_target;
|
||||
}
|
||||
|
||||
if (energy < 32)
|
||||
energy = 32;
|
||||
if (energy < PEEP_MIN_ENERGY)
|
||||
energy = PEEP_MIN_ENERGY;
|
||||
|
||||
/* Previous code here suggested maximum energy is 128. */
|
||||
energy = Math::Min(static_cast<uint8>(PEEP_MAX_ENERGY), energy);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define PEEP_LOST_WARNING_THRESHOLD 8
|
||||
|
||||
#define PEEP_MAX_HAPPINESS 255
|
||||
#define PEEP_MIN_ENERGY 32
|
||||
#define PEEP_MAX_ENERGY 128
|
||||
#define PEEP_MAX_ENERGY_TARGET 255 // Oddly, this differs from max energy!
|
||||
|
||||
|
||||
Reference in new issue
Block a user