yeti cleanup and death animation rework, hitbox fix ups
[supertux.git] / src / sector.cpp
index 506ff4b..93a0858 100644 (file)
@@ -1,7 +1,7 @@
 //  $Id$
 //
 //  SuperTux -  A Jump'n Run
-//  Copyright (C) 2004 Matthias Braun <matze@braunis.de
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
@@ -68,6 +68,7 @@
 Sector* Sector::_current = 0;
 
 bool Sector::show_collrects = false;
+bool Sector::draw_solids_only = false;
 
 Sector::Sector()
   : currentmusic(LEVEL_MUSIC), gravity(10),
@@ -700,7 +701,14 @@ Sector::draw(DrawingContext& context)
     GameObject* object = *i; 
     if(!object->is_valid())
       continue;
-    
+
+    if (draw_solids_only)
+    {
+      TileMap* tm = dynamic_cast<TileMap*>(object);
+      if (tm && !tm->is_solid())
+        continue;
+    }
+
     object->draw(context);
   }