Fixed Rocks being flagged as on the ground while they are carried
authorChristoph Sommer <mail@christoph-sommer.de>
Sun, 17 Jun 2007 09:33:58 +0000 (09:33 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Sun, 17 Jun 2007 09:33:58 +0000 (09:33 +0000)
SVN-Revision: 5110

src/object/rock.cpp

index 255a4e6..7c56e1a 100644 (file)
@@ -91,7 +91,7 @@ Rock::collision_solid(const CollisionHit& hit)
   if(hit.crush)
     physic.set_velocity(0, 0);
 
-  if(hit.bottom  && !on_ground) {
+  if(hit.bottom  && !on_ground && !grabbed) {
     sound_manager->play(ROCK_SOUND, get_pos());
     on_ground = true;
   }
@@ -123,7 +123,7 @@ Rock::grab(MovingObject& , const Vector& pos, Direction)
   movement = pos - get_pos();
   last_movement = movement;
   set_group(COLGROUP_TOUCHABLE);
-  on_ground = true;
+  on_ground = false;
   grabbed = true;
 }