pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/actions walker.cxx,1.11,1.12


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions walker.cxx,1.11,1.12
Date: 28 Jun 2002 17:04:23 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv10918/actions

Modified Files:
        walker.cxx 
Log Message:
- fixed walker/bridger bug

Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- walker.cxx  28 Jun 2002 15:12:23 -0000      1.11
+++ walker.cxx  28 Jun 2002 17:04:21 -0000      1.12
@@ -95,6 +95,7 @@
     }
 
   
+  // FIXME: here we could/should scan more pixels
   if (rel_getpixel(1, 0) == GroundpieceData::GP_BRIDGE
       && !head_collision_on_walk(1, 1))  // bridge
     {
@@ -119,15 +120,18 @@
       int y_inc = 0;
       int possible_y_step = 0;
       bool found_next_step = false;
-       for(y_inc=-max_steps; y_inc <= max_steps; y_inc++) // up/down-hill scan
-       if (rel_getpixel(1, y_inc) ==  GroundpieceData::GP_NOTHING
-           && rel_getpixel(1, y_inc - 1) !=  GroundpieceData::GP_NOTHING)
-         { // FIXME:
-           found_next_step = true;
-           possible_y_step = y_inc;
-           // No break here, since we always want to use the highest possible 
position
-           //break;
-         }
+      for(y_inc=-max_steps; y_inc <= max_steps; y_inc++)
+       {// up/down-hill scan
+         if ((rel_getpixel(1, y_inc) ==  GroundpieceData::GP_NOTHING
+              || rel_getpixel(1, y_inc) ==  GroundpieceData::GP_BRIDGE) // 
FIXME: This causes a rather huge step
+             && rel_getpixel(1, y_inc - 1) !=  GroundpieceData::GP_NOTHING)
+           { // FIXME:
+             found_next_step = true;
+             possible_y_step = y_inc;
+             // No break here, since we always want to use the highest 
possible position
+             //break;
+           }
+       }
       
       if (found_next_step)
        {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]