From: Matthias Braun Date: Sun, 22 May 2005 16:22:35 +0000 (+0000) Subject: fix object placement wrong when flipping X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c57c8b2007c806034f031f50a706824516ac8850;p=supertux.git fix object placement wrong when flipping SVN-Revision: 2532 --- diff --git a/src/flip_level_transformer.cpp b/src/flip_level_transformer.cpp index 3fafbd5cc..7f8ef95ec 100644 --- a/src/flip_level_transformer.cpp +++ b/src/flip_level_transformer.cpp @@ -44,7 +44,7 @@ FlipLevelTransformer::transform_sector(Sector* sector) Player* player = dynamic_cast (object); if(player) { Vector pos = player->get_pos(); - pos.y = height - pos.y; + pos.y = height - pos.y - player->get_bbox().get_height(); player->move(pos); continue; } @@ -108,7 +108,7 @@ void FlipLevelTransformer::transform_moving_object(float height, MovingObject*object) { Vector pos = object->get_pos(); - pos.y = height - pos.y; + pos.y = height - pos.y - object->get_bbox().get_height(); object->set_pos(pos); }