diff options
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/char/char.c b/src/char/char.c index b19e750..0ab7145 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -69,12 +69,12 @@ mf_char_update(struct mf_char *c) /* Reached next cell */ c->cur_x = c->new_x; c->cur_y = c->new_y; + c->travel -= c->cell_width; if (c->step(c) < 0) { return -1; } if (c->cur_dir == c->new_dir) { /* Want to continue straight */ - c->travel -= c->cell_width; } else { /* Want to stop or turn */ c->travel = 0; @@ -104,7 +104,7 @@ mf_char_update(struct mf_char *c) case MF_CHAR_DIR_D_: dx = 0; dy = 1; break; case MF_CHAR_DIR_L_: dx = -1; dy = 0; break; case MF_CHAR_DIR_R_: dx = 1; dy = 0; break; - default: dx = 0; dy = 0; break; + default: dx = 0; dy = 0; break; } c->new_dir = MF_CHAR_DIR_N_; if (mf_maze_is_wall(c->maze, c->cur_x, c->cur_y, |