Fix drawing of walls with incorrect scrolling modes (#11453)

This commit is contained in:
Michael Steenbeek 2020-04-25 11:19:13 +02:00 committed by GitHub
parent 6ebd918cde
commit b417da7905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -426,6 +426,11 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons
}
uint16_t scrollingMode = sceneryEntry->wall.scrolling_mode + ((direction + 1) & 0x3);
if (scrollingMode >= MAX_SCROLLING_TEXT_MODES)
{
return;
}
auto banner = tile_element->AsWall()->GetBanner();
if (banner != nullptr && !banner->IsNull())
{