From: Christoph Sommer Date: Sun, 17 Jun 2007 09:33:58 +0000 (+0000) Subject: Fixed Rocks being flagged as on the ground while they are carried X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dd9fdb809ad6effa216e4483f099a48ab2814352;p=supertux.git Fixed Rocks being flagged as on the ground while they are carried SVN-Revision: 5110 --- diff --git a/src/object/rock.cpp b/src/object/rock.cpp index 255a4e6de..7c56e1afc 100644 --- a/src/object/rock.cpp +++ b/src/object/rock.cpp @@ -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; }