Quick and dirty fix to respawn camera jump bug; bug 850
authorJonas Kuemmerlin <rgcjonas@gmail.com>
Wed, 13 Feb 2013 20:09:16 +0000 (10:09 -1000)
committerLMH <lmh.0013@gmail.com>
Wed, 13 Feb 2013 20:09:16 +0000 (10:09 -1000)
src/supertux/sector.cpp

index c52a03c..91b469d 100644 (file)
@@ -594,7 +594,13 @@ Sector::activate(const Vector& player_pos)
     }
   }
 
+  //FIXME: This is a really dirty workaround for this strange camera jump
+  player->move(player->get_pos()+Vector(-32, 0));
   camera->reset(player->get_pos());
+  camera->update(1);
+  player->move(player->get_pos()+(Vector(32, 0)));
+  camera->update(1);
+  
   update_game_objects();
 
   //Run default.nut just before init script