From c4a8d27648f4fc86cb059a9c662c5af056fec917 Mon Sep 17 00:00:00 2001 From: zsilencer Date: Sat, 25 Jul 2015 08:50:59 -0600 Subject: [PATCH] fix couple of bugs --- src/management/news_item.c | 4 ++-- src/world/map.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/management/news_item.c b/src/management/news_item.c index 787dbbdeca..bf3fc32a18 100644 --- a/src/management/news_item.c +++ b/src/management/news_item.c @@ -112,7 +112,7 @@ static bool news_item_is_current_old() */ void news_item_update_current() { - short ax, bx, remove_time; + short ax, bx; get_system_time(); @@ -415,7 +415,7 @@ void news_item_disable_news(uint8 type, uint32 assoc) { { if (!news_item_is_empty(i)) { - rct_news_item * const newsItem; + rct_news_item * const newsItem = news_item_get(i); if (type == newsItem->type && assoc == newsItem->assoc) { newsItem->flags |= 0x1; if (i == 0) { diff --git a/src/world/map.c b/src/world/map.c index b74cc7398a..97c14edb39 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -2999,9 +2999,9 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle continue; } int water_height = ((map_element->properties.surface.terrain & MAP_ELEMENT_WATER_HEIGHT_MASK) * 2); - if (water_height && water_height >= zLow && map_element->base_height < zHigh) { + if (water_height && water_height > zLow && map_element->base_height < zHigh) { RCT2_GLOBAL(0x00F1AD60, uint8) |= 4; - if (water_height > zHigh) { + if (water_height < zHigh) { goto loc_68BAE6; } } @@ -3025,7 +3025,7 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle int ah = al; int cl = al; int ch = al; - uint8 slope = map_element->properties.surface.slope & MAP_ELEMENT_SLOPE_MASK; //F + uint8 slope = map_element->properties.surface.slope & MAP_ELEMENT_SLOPE_MASK; if (slope & 1) { al += 2; if (slope == 0x1B)