From 40cea0e7e7de6c109214fbecf6507d303ba3f3ce Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Fri, 8 Dec 2017 11:24:45 +0100 Subject: [PATCH] Fix #2607: Rain rendered incorrectly in additional viewport --- distribution/changelog.txt | 1 + src/openrct2/drawing/Rain.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index d8c2b9b514..a07ac2c790 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -34,6 +34,7 @@ - Fix: [#1185] Close button colour of prompt windows does not match. - Fix: [#1833, #4937, #6138] 'Too low!' warning when building rides and shops on the lowest land level (original bug). - Fix: [#2254] Edge scrolling horizontally now has the same speed as vertical edge scrolling. +- Fix: [#2607] Rain rendered incorrectly in additional viewport. - Fix: [#4760] Asia - Great Wall of China and South America - Rio Carnival have incorrect guest entry points (original bug). - Fix: [#4991] Inverted helices can be built on the Lay Down RC, but are not drawn. - Fix: [#5417] Hacked Crooked House tracked rides do not dispatch vehicles. diff --git a/src/openrct2/drawing/Rain.cpp b/src/openrct2/drawing/Rain.cpp index d9a46fe9b3..530d02a2db 100644 --- a/src/openrct2/drawing/Rain.cpp +++ b/src/openrct2/drawing/Rain.cpp @@ -59,10 +59,10 @@ static void CallDrawRainFunc(IRainDrawer * rainDrawer, return; } - left = Math::Max(left, vp->x); - right = Math::Min(right, vp->width); - top = Math::Max(top, vp->y); - bottom = Math::Min(bottom, vp->height); + left = Math::Max(left, vp->x); + right = Math::Min(right, vp->x + vp->width); + top = Math::Max(top, vp->y); + bottom = Math::Min(bottom, vp->y + vp->height); if (left >= right || top >= bottom) { return;