mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Avoid warning spam during park entrance drawing
This commit is contained in:
@@ -76,7 +76,7 @@ public:
|
||||
if (index >= (size_t)object_entry_group_counts[objectType])
|
||||
{
|
||||
#ifdef DEBUG
|
||||
log_warning("Object index %u exceeds maximum for type type %d.", index, objectType);
|
||||
log_warning("Object index %u exceeds maximum for type %d.", index, objectType);
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -211,11 +211,17 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32
|
||||
_unk9E32BC = ghost_id;
|
||||
}
|
||||
|
||||
rct_footpath_entry* path_entry = get_footpath_entry(tile_element->properties.entrance.path_type);
|
||||
|
||||
// Index to which part of the entrance
|
||||
// Middle, left, right
|
||||
uint8 part_index = tile_element->properties.entrance.index & 0xF;
|
||||
rct_footpath_entry * path_entry = nullptr;
|
||||
|
||||
// The left and right of the park entrance often have this set to 127.
|
||||
// So only attempt to get the footpath type if we're dealing with the middle bit of the entrance.
|
||||
if (part_index == 0)
|
||||
path_entry = get_footpath_entry(tile_element->properties.entrance.path_type);
|
||||
|
||||
|
||||
rct_entrance_type* entrance;
|
||||
uint8 di = ((direction / 2 + part_index / 2) & 1) ? 0x1A : 0x20;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user