Skip to content

Commit

Permalink
Make 0-length gravity lines invisible again
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox authored and flibitijibibo committed Nov 17, 2024
1 parent 6388016 commit d4e472d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions desktop_version/src/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,11 @@ void Graphics::drawgravityline(const int t, const int x, const int y, const int
return;
}

if (w <= 0 && h <= 0)
{
return;
}

if (obj.entities[t].life == 0)
{
if (game.noflashingmode)
Expand Down

2 comments on commit d4e472d

@Buggem
Copy link

@Buggem Buggem commented on d4e472d Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why &&, wouldn't || work just as well? (if not better?)

@NyakoFox
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a vertical gravity line has a width of 0. additionally a horizontal gravity line has a height of 0. || would make all gravity lines invisible

Please sign in to comment.