From 220c2d3fc9bb88d5876df665bcdb860764ca2118 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Tue, 13 Jan 2015 17:31:33 +0000 Subject: [PATCH] fix #685, peep falling code was not masking tile type --- src/peep/peep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index 3eb7d8f395..f514a77537 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -356,7 +356,7 @@ void peep_update_falling(rct_peep* peep){ final_element = map_element->flags & MAP_ELEMENT_FLAG_LAST_TILE; // If a path check if we are on it - if (map_element->type == MAP_ELEMENT_TYPE_PATH){ + if ((map_element->type & MAP_ELEMENT_TYPE_MASK) == MAP_ELEMENT_TYPE_PATH){ int height = map_height_from_slope(peep->x, peep->y, map_element->properties.surface.slope) + map_element->base_height * 8; @@ -366,7 +366,7 @@ void peep_update_falling(rct_peep* peep){ saved_map = map_element; break; } // If a surface get the height and see if we are on it - else if (map_element->type == MAP_ELEMENT_TYPE_SURFACE){ + else if ((map_element->type & MAP_ELEMENT_TYPE_MASK) == MAP_ELEMENT_TYPE_SURFACE){ // If the surface is water check to see if we could be drowning if (map_element->properties.surface.terrain & MAP_ELEMENT_WATER_HEIGHT_MASK){ int height = (map_element->properties.surface.terrain & MAP_ELEMENT_WATER_HEIGHT_MASK) * 16;