From 02dc1084e7015419082070813cd15632c09ec5e5 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 26 Apr 2020 11:42:06 -0700 Subject: [PATCH] Fix offscreen teleporter rendering This fixes an oddity that's only visual, which could only happen in custom levels by using the createentity() internal command. For the same reason that the second through fourth tiles of moving platforms on the top and left was buggily rendered, SDL_BlitSurface() strikes again to mutate the SDL_Rect we pass it and render the next SDL_BlitSurface() call inbounds, even though we don't need it to. --- desktop_version/src/Graphics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index c9b708cc..c33d5871 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -2839,6 +2839,7 @@ void Graphics::drawtele(int x, int y, int t, int c) if (t > 9) t = 8; if (t < 0) t = 0; + setRect(telerect, x , y, tele_rect.w, tele_rect.h ); BlitSurfaceColoured(tele[t], NULL, backBuffer, &telerect, ct); }