From 0cf54642cbe3e999a48c8447652e395b17c648e2 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 23 Oct 2019 22:47:48 -0400 Subject: fix hard drop ghosts --- lib/cetris.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/cetris.h b/lib/cetris.h index 2382173..0ccbb9f 100644 --- a/lib/cetris.h +++ b/lib/cetris.h @@ -284,7 +284,11 @@ static void make_ghosts(cetris_game *g) { while (check_matrix(g, &g->current.m) > 0) { g->current.pos.y++; } - g->current.ghost_y = g->current.pos.y - 1; + if (g->current.pos.y == orig_y) { + g->current.ghost_y = orig_y; + } else { + g->current.ghost_y = g->current.pos.y - 1; + } g->current.pos.y = orig_y; } -- cgit v1.2.3-101-g0448