[gcompris] maze: fix Tux running beyond the door in fast-mode
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] maze: fix Tux running beyond the door in fast-mode
- Date: Sun, 30 Sep 2012 15:00:28 +0000 (UTC)
commit f2695854814dd3c60a71077bd2cafe47e2420a9e
Author: Peter Albrecht <pa-dev gmx de>
Date: Thu Sep 27 21:25:02 2012 +0200
maze: fix Tux running beyond the door in fast-mode
In the previous implementation (from 2002), fast-mode was not
immediately disabled, when Tux reached the exit. Instead of that,
Tux kept running further along an unambiguous path, until he
reached a fork or a dead end, although he already reached the
door. => He ran through the door.
This looked very strange. Now this is fixed.
src/maze-activity/maze.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/maze-activity/maze.c b/src/maze-activity/maze.c
index f767d6b..c162e53 100644
--- a/src/maze-activity/maze.c
+++ b/src/maze-activity/maze.c
@@ -1149,8 +1149,7 @@ static gint key_press(guint keyval, gchar *commit_str, gchar *preedit_str)
viewing_direction=richting;
/* run until we come to a fork, (make sure to stop on next level!) */
- while (run_fast && (richting=available_direction(richting))
- && gcomprisBoard->level==level)
+ while (run_fast && (richting=available_direction(richting)) && !gamewon)
{
one_step(richting);
viewing_direction=richting;
@@ -1246,8 +1245,7 @@ static gint key_press_2D_relative(guint keyval, gchar *commit_str, gchar *preedi
richting=viewing_direction;
/* run until we come to a fork, (make sure to stop on next level!) */
- while (run_fast && (richting=available_direction(richting))
- && gcomprisBoard->level==level)
+ while (run_fast && (richting=available_direction(richting)) && !gamewon)
{
one_step(richting);
viewing_direction=richting;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]