1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

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.
This commit is contained in:
Misa 2021-04-13 18:21:21 -07:00 committed by Ethan Lee
parent 235046f7ad
commit 8b042a5813

View File

@ -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;