X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fplayer.cpp;h=df2ca019069faa2c9a0fa3ab18a3f9a7f894db3d;hb=38f0ccbd01a1e73b7c587e241a7bc0c8443e8fe6;hp=2b0ae7710fcbd736d9d8fd017eb5ac6d339829e0;hpb=ca86583fae991aa3280c5d70bf20dbf0504a93cb;p=supertux.git diff --git a/src/object/player.cpp b/src/object/player.cpp index 2b0ae7710..df2ca0190 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -202,7 +202,7 @@ Player::adjust_height(float new_height) if(new_height > bbox.get_height()) { Rect additional_space = bbox2; additional_space.set_height(new_height - bbox.get_height()); - if(!Sector::current()->is_free_space(additional_space)) + if(!Sector::current()->is_free_of_statics(additional_space, this)) return false; } @@ -645,7 +645,7 @@ Player::handle_input() Vector(dir == LEFT ? -bbox.get_width()-1 : bbox.get_width()+1, bbox.get_height()*0.66666 - 32); Rect dest(pos, pos + Vector(32, 32)); - if(Sector::current()->is_free_space(dest)) { + if(Sector::current()->is_free_of_statics(dest)) { MovingObject* moving_object = dynamic_cast (grabbed_object); if(moving_object) { moving_object->set_pos(pos);