-converted remaining classes to GameObject
[supertux.git] / src / collision.cpp
index 2f41fed..5f08756 100644 (file)
@@ -44,6 +44,9 @@ bool rectcollision_offset(const base_type& one, const base_type& two, float off_
 
 bool collision_object_map(const base_type& base)
 {
+  if(!World::current())
+  return false;
+  
   const Level& level = *World::current()->get_level();
   TileManager& tilemanager = *TileManager::instance();
 
@@ -260,6 +263,12 @@ bool isice(float x, float y)
   return tile && tile->ice;
 }
 
+bool isspike(float x, float y)
+{
+  Tile* tile = gettile(x,y);
+  return tile && tile->spike;
+}
+
 bool isfullbox(float x, float y)
 {
   Tile* tile = gettile(x,y);