From: Christian Heller Date: Tue, 14 May 2013 03:17:12 +0000 (+0200) Subject: Forgot to check for success of current move in comparison with previous one. X-Git-Tag: tce~1302 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bprefix%7D%7D/todo?a=commitdiff_plain;h=9e3e8456a3a835d786566de40f17c3ffcde4e929;p=plomrogue Forgot to check for success of current move in comparison with previous one. --- 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));