1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #4644: steam particle sprite crash

This commit is contained in:
Yaroslav Tretyakov
2016-10-18 13:59:53 -06:00
committed by Ted John
parent 7ca8b3d278
commit 82b18ddaf3

View File

@@ -6639,6 +6639,9 @@ static void steam_particle_create(sint16 x, sint16 y, sint16 z)
rct_map_element *mapElement = map_get_surface_element_at(x >> 5, y >> 5);
if (mapElement != NULL && z > mapElement->base_height * 8) {
rct_steam_particle *steam = (rct_steam_particle*)create_sprite(2);
if (steam == NULL)
return;
steam->sprite_width = 20;
steam->sprite_height_negative = 18;
steam->sprite_height_positive = 16;