mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #4133 from janisozaur/fixes
This commit is contained in:
commit
0c180b8171
|
@ -426,6 +426,9 @@ static uint8 peep_assess_surroundings(sint16 center_x, sint16 center_y, sint16 c
|
|||
break;
|
||||
|
||||
scenery = get_footpath_item_entry(footpath_element_get_path_scenery_index(mapElement));
|
||||
if (scenery == NULL) {
|
||||
return PEEP_THOUGHT_TYPE_NONE;
|
||||
}
|
||||
if (footpath_element_path_scenery_is_ghost(mapElement))
|
||||
break;
|
||||
|
||||
|
@ -10893,6 +10896,10 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1,
|
|||
void game_command_set_guest_name(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp) {
|
||||
uint16 sprite_index = *ecx & 0xFFFF;
|
||||
|
||||
if (sprite_index >= MAX_SPRITES) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
rct_peep *peep = GET_PEEP(sprite_index);
|
||||
if (peep->type != PEEP_TYPE_GUEST) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
|
|
|
@ -1236,6 +1236,10 @@ int staff_path_finding(rct_peep* peep) {
|
|||
void game_command_set_staff_name(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp) {
|
||||
uint16 sprite_index = *ecx & 0xFFFF;
|
||||
|
||||
if (sprite_index >= MAX_SPRITES) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
rct_peep *peep = GET_PEEP(sprite_index);
|
||||
if (peep->type != PEEP_TYPE_STAFF) {
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
|
|
|
@ -1393,6 +1393,9 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin
|
|||
}
|
||||
|
||||
rct_track_td6 *td6 = gActiveTrackDesign;
|
||||
if (td6 == NULL) {
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
rct_object_entry *rideEntryObject = &td6->vehicle_object;
|
||||
|
||||
uint8 entryType, entryIndex;
|
||||
|
|
|
@ -120,6 +120,10 @@ void window_save_prompt_open()
|
|||
rct_widget *widgets;
|
||||
uint64 enabled_widgets;
|
||||
|
||||
if (gSavePromptMode >= countof(window_save_prompt_labels)) {
|
||||
log_warning("Invalid save prompt mode %u", gSavePromptMode);
|
||||
return;
|
||||
}
|
||||
prompt_mode = gSavePromptMode;
|
||||
if (prompt_mode == PM_QUIT)
|
||||
prompt_mode = PM_SAVE_BEFORE_QUIT;
|
||||
|
|
Loading…
Reference in New Issue