gnome-games r9060 - branches/gnome-2-26/gnibbles



Author: jclinton
Date: Mon Apr 13 16:22:46 2009
New Revision: 9060
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9060&view=rev

Log:
don't kill worm by pressing backwards. Patch by Roger Light. Fixes bug #516992

Modified:
   branches/gnome-2-26/gnibbles/gnibbles.c
   branches/gnome-2-26/gnibbles/worm.c

Modified: branches/gnome-2-26/gnibbles/gnibbles.c
==============================================================================
--- branches/gnome-2-26/gnibbles/gnibbles.c	(original)
+++ branches/gnome-2-26/gnibbles/gnibbles.c	Mon Apr 13 16:22:46 2009
@@ -590,8 +590,9 @@
 gnibbles_keypress_worms (guint keyval)
 {
   gint i;
+  gint numworms = ggz_network_mode ? 1 : properties->numworms;
 
-  for (i = 0; i < properties->numworms; i++)
+  for (i = 0; i < numworms; i++)
     if (gnibbles_worm_handle_keypress (worms[i], keyval)) {
       return TRUE;
     }

Modified: branches/gnome-2-26/gnibbles/worm.c
==============================================================================
--- branches/gnome-2-26/gnibbles/worm.c	(original)
+++ branches/gnome-2-26/gnibbles/worm.c	Mon Apr 13 16:22:46 2009
@@ -534,6 +534,9 @@
   if (ggz_network_mode) {
 #ifdef GGZ_CLIENT
     network_game_move (dir);
+
+    worms[0]->direction = dir;
+    worms[0]->keypress = 1;
 #endif
   } else {
     worm_set_direction (worm, dir);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]