improve tux holding objects
[supertux.git] / src / world.cpp
index 11bc77c..eb15b79 100644 (file)
@@ -129,17 +129,10 @@ World::apply_bonuses()
 
 World::~World()
 {
-  for (Trampolines::iterator i = trampolines.begin(); i != trampolines.end(); ++i)
-    delete *i;
-
   for (std::vector<GameObject*>::iterator i = gameobjects.begin();
           i != gameobjects.end(); ++i) {
-    Drawable* drawable = dynamic_cast<Drawable*> (*i);
-    if(drawable)
-      displaymanager.remove_drawable(drawable);
     delete *i;
   }
-  bad_guys.clear();
 
   delete level;
 }
@@ -402,7 +395,7 @@ World::collision_handler()
             {
               // We have detected a collision and now call the
               // collision functions of the collided objects.
-              (*j)->collision(&bullets[i], CO_BULLET, COLLISION_NORMAL);
+              (*j)->collision(bullets[i], CO_BULLET, COLLISION_NORMAL);
               bullets[i]->collision(CO_BADGUY);
               break; // bullet is invalid now, so break
             }