mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-02-01 21:55:01 +01:00
Prevent double-rendering of warping sprites on left and top of screen
Previously, the game could end up rendering a warping sprite twice due to the fact that it could run "if entity is on the right side of the screen" right after "if entity is on the left side of the screen" (but not the other way around). This is most noticeable if you have a custom player sprite with translucent pixels and stand on the left side of a warping screen, but the code suggests it happens when warping through the top of the screen, too.
This commit is contained in:
parent
276daa11bb
commit
4c45a8ac47
1 changed files with 2 additions and 2 deletions
|
@ -1449,7 +1449,7 @@ void Graphics::drawentities()
|
|||
drawRect.y += tpoint.y;
|
||||
BlitSurfaceColoured((*spritesvec)[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct);
|
||||
}
|
||||
if (tpoint.x > 300)
|
||||
else if (tpoint.x > 300)
|
||||
{
|
||||
tpoint.x -= 320;
|
||||
drawRect = sprites_rect;
|
||||
|
@ -1468,7 +1468,7 @@ void Graphics::drawentities()
|
|||
drawRect.y += tpoint.y;
|
||||
BlitSurfaceColoured((*spritesvec)[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct);
|
||||
}
|
||||
if (tpoint.y > 210)
|
||||
else if (tpoint.y > 210)
|
||||
{
|
||||
tpoint.y -= 230;
|
||||
drawRect = sprites_rect;
|
||||
|
|
Loading…
Add table
Reference in a new issue