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 miner.cxx,1.17,1.18


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions miner.cxx,1.17,1.18
Date: 5 Dec 2002 20:38:12 -0000

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

Modified Files:
        miner.cxx 
Log Message:
- applied Gervases Miner patch
- added some UNUSED_ARG calls


Index: miner.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- miner.cxx   22 Oct 2002 00:07:56 -0000      1.17
+++ miner.cxx   5 Dec 2002 20:38:10 -0000       1.18
@@ -78,9 +78,12 @@
                                                   
static_cast<int>(pingu->get_y() - miner_radius_width + 3) );
       pingu->set_action(Actions::Walker);
     }
-  else if (rel_getpixel(0, -1) == Groundtype::GP_SOLID)
+  else if (rel_getpixel(0, -1) == Groundtype::GP_SOLID
+       || rel_getpixel(0, pingu_height) == Groundtype::GP_SOLID)
     {
-      PingusSound::play_sound("sounds/chink.wav");
+      if (rel_getpixel(0, -1) == Groundtype::GP_SOLID)
+       PingusSound::play_sound("sounds/chink.wav");
+
       WorldObj::get_world()->get_colmap ()->remove(miner_radius,
                                                   
static_cast<int>(pingu->get_x() - (miner_radius_width / 2) + pingu->direction), 
                                                   
static_cast<int>(pingu->get_y() - miner_radius_width + 1) );
@@ -88,6 +91,9 @@
                                                   
static_cast<int>(pingu->get_x() - (miner_radius_gfx_width / 2) + 
pingu->direction),
                                                   
static_cast<int>(pingu->get_y() - miner_radius_gfx_width + 1) );
       pingu->set_action(Actions::Walker);
+
+      // Stop Pingu walking further into the solid.
+      pingu->direction.change();
     }
 }
 





reply via email to

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