Changed ObjectFactory code so that it works properly when building SuperTux as library
[supertux.git] / src / object / bonus_block.cpp
index 55481d7..f09cef2 100644 (file)
@@ -89,7 +89,7 @@ BonusBlock::BonusBlock(const Reader& lisp) :
       }
     } else {
       if(contents == CONTENT_CUSTOM) {
-        GameObject* game_object = create_object(token, *(iter.lisp()));
+        GameObject* game_object = ObjectFactory::instance().create(token, *(iter.lisp()));
         object = dynamic_cast<MovingObject*> (game_object);
         if(object == 0)
           throw std::runtime_error(
@@ -227,6 +227,4 @@ Block::break_me()
   remove_me();
 }
 
-IMPLEMENT_FACTORY(BonusBlock, "bonusblock");
-
 /* EOF */