mirror of https://github.com/OpenRCT2/OpenRCT2.git
Don't try placing null scenery entries in RMG
This commit is contained in:
parent
3f685b4213
commit
e9c429e9ee
|
@ -242,6 +242,10 @@ static void mapgen_place_tree(sint32 type, sint32 x, sint32 y)
|
|||
sint32 surfaceZ;
|
||||
rct_tile_element * tileElement;
|
||||
rct_scenery_entry * sceneryEntry = get_small_scenery_entry(type);
|
||||
if (sceneryEntry == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
surfaceZ = tile_element_height(x * 32 + 16, y * 32 + 16) / 8;
|
||||
tileElement = tile_element_insert(x, y, surfaceZ, (1 | 2 | 4 | 8));
|
||||
|
|
Loading…
Reference in New Issue