diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-08-08 15:20:39 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-08-08 15:20:39 (EDT) |
commit | f3e785b8098789d853715c30c1543d4b4982c05d (patch) | |
tree | 14b0b48c2f6c77e2a811e024ae1c310df7dcbc6b /src | |
parent | 044bb1053fc14b2455a825400ad0c5ee1899f4a3 (diff) | |
download | mazefight-f3e785b8098789d853715c30c1543d4b4982c05d.zip mazefight-f3e785b8098789d853715c30c1543d4b4982c05d.tar.gz mazefight-f3e785b8098789d853715c30c1543d4b4982c05d.tar.bz2 |
player: Fix eyes masking
Wow.
Diffstat (limited to 'src')
-rw-r--r-- | src/player.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c index 162434a..4232842 100644 --- a/src/player.c +++ b/src/player.c @@ -322,7 +322,7 @@ mf_player_render(struct mf_player *p, SDL_Renderer *renderer) do { \ hy = round(sqrt((r-0.5)*(r-0.5) - \ (X+fx-ox-0.5)*(X+fx-ox-0.5)) + 0.5); \ - if (Y - oy >= 0-hy || Y - oy <= hy) { \ + if (Y - oy >= 0-hy && Y - oy <= hy) { \ if (SDL_RenderDrawPoint(renderer, \ cx + fx - ox + X, cy - oy + Y) \ < 0) { \ @@ -334,7 +334,7 @@ mf_player_render(struct mf_player *p, SDL_Renderer *renderer) } \ hy = round(sqrt((r-0.5)*(r-0.5) - \ (X+fx+ox-0.5)*(X+fx+ox-0.5)) + 0.5); \ - if (Y - oy >= 0-hy || Y - oy <= hy) { \ + if (Y - oy >= 0-hy && Y - oy <= hy) { \ if (SDL_RenderDrawPoint(renderer, \ cx + fx + ox + X, cy - oy + Y) \ < 0) { \ |