From 9e3e8456a3a835d786566de40f17c3ffcde4e929 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 14 May 2013 05:17:12 +0200 Subject: [PATCH 1/1] Forgot to check for success of current move in comparison with previous one. --- roguelike.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roguelike.c b/roguelike.c index 2319963..9fb9d31 100644 --- a/roguelike.c +++ b/roguelike.c @@ -350,7 +350,7 @@ void move_player (struct World * world, char d) { if (is_passable(world, world->player->x + 1, world->player->y)) { world->player->x++; success = 1; } } - if (prev == d) + if (success * d == prev) update_log (world, "."); else { char * msg = calloc(25, sizeof(char)); -- 2.30.2