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
1 changed files with 3 additions and 0 deletions

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;