home · contact · privacy
Forgot to check for success of current move in comparison with previous one.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 14 May 2013 03:17:12 +0000 (05:17 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 14 May 2013 03:17:12 +0000 (05:17 +0200)
roguelike.c

index 2319963448077b077908e5aa4cb063f051ab729c..9fb9d31142d69a292ea5175603bfd2d0cc3e8dbc 100644 (file)
@@ -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));