{
if( grabbed )
return;
-
+
movement = physic.get_movement(elapsed_time);
}
physic.set_velocity_x( 0 );
if( hit.crush )
physic.set_velocity(0, 0);
-
+
if( hit.bottom && !on_ground ){
sound_manager->play( ROCK_SOUND, get_pos() );
on_ground = true;
if( !on_ground ){
return FORCE_MOVE;
}
-
- //Fake being solid for moving_object.
+
+ //Fake being solid for moving_object.
MovingObject* moving_object = dynamic_cast<MovingObject*> (&other);
if( moving_object ){
if( hit.top ){
float inside = moving_object->get_bbox().get_bottom() - get_bbox().get_top();
if( inside > 0 ){
Vector pos = moving_object->get_pos();
- pos.y -= inside;
- moving_object->set_pos( pos );
+ pos.y -= inside;
+ moving_object->set_pos( pos );
}
}
CollisionHit hit_other = hit;
set_group( COLGROUP_DISABLED );
on_ground = true;
grabbed = true;
-
+
}
void
}
IMPLEMENT_FACTORY(Rock, "rock");
-