Merge pull request #7354 from Broxzier/fix/clip-height-assumes-order

Fix clipheight assuming tile order
This commit is contained in:
Hielke Morsink 2018-03-28 12:48:03 +02:00 committed by GitHub
commit 8c23f16502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -10,6 +10,7 @@
- Fix: [#5210] Default system dialog not accessible from saving landscape window.
- Fix: [#7176] Mechanics sometimes fall down from rides.
- Fix: [#7327] Abstract scenery and stations don't get fully See-Through when hiding them (original bug).
- Fix: Cut-away view does not draw tile elements that have been moved down on the list.
- Improved: Raising land near the map edge makes the affected area smaller instead of showing an 'off edge map' error.
0.1.2 (2018-03-18)

View File

@ -162,13 +162,6 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y)
}
#endif // __TESTPAINT__
/* Check if the first (lowest) tile_element is below the clip
* height. */
if ((gCurrentViewportFlags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) && (tile_element->base_height > gClipHeight)) {
blank_tiles_paint(session, x, y);
return;
}
sint32 dx = 0;
switch (rotation) {
case 0:
@ -253,7 +246,8 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y)
sint32 previousHeight = 0;
do {
// Only paint tile_elements below the clip height.
if ((gCurrentViewportFlags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) && (tile_element->base_height > gClipHeight)) break;
if ((gCurrentViewportFlags & VIEWPORT_FLAG_PAINT_CLIP_TO_HEIGHT) && (tile_element->base_height > gClipHeight))
continue;
sint32 direction = tile_element_get_direction_with_offset(tile_element, rotation);
sint32 height = tile_element->base_height * 8;