From 8b042a58131fd1c4a906bf3f540846bc468d3228 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 13 Apr 2021 18:21:21 -0700 Subject: [PATCH] Fix vertically-warping entities being drawn with wrong offset When an entity vertically warps, it teleports upwards or downwards by 232 pixels. However, the graphics code draws them with an offset of 230 pixels. This is off by 2 pixels, but it's enough to make a downwards-moving enemy look like it suddenly collides with the bottom of the screen (in a room without a room name) before it warps, especially if you go frame-by-frame. --- desktop_version/src/Graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index fe4fdfbb..6e8087f9 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1801,12 +1801,12 @@ void Graphics::drawentity(const int i, const int yoff) if (tpoint.y < 0) { wrapY = true; - wrappedPoint.y += 230; + wrappedPoint.y += 232; } else if (tpoint.y > 210) { wrapY = true; - wrappedPoint.y -= 230; + wrappedPoint.y -= 232; } const bool isInWrappingAreaOfTower = map.towermode && !map.minitowermode && map.ypos >= 500 && map.ypos <= 5000;