fix object placement wrong when flipping
authorMatthias Braun <matze@braunis.de>
Sun, 22 May 2005 16:22:35 +0000 (16:22 +0000)
committerMatthias Braun <matze@braunis.de>
Sun, 22 May 2005 16:22:35 +0000 (16:22 +0000)
SVN-Revision: 2532

src/flip_level_transformer.cpp

index 3fafbd5..7f8ef95 100644 (file)
@@ -44,7 +44,7 @@ FlipLevelTransformer::transform_sector(Sector* sector)
     Player* player = dynamic_cast<Player*> (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);
 }