Improve glass
[oweals/minetest.git] / src / clientobject.cpp
index ee2ad0b9fcd7cf0aa71fc6ee3ba768761abed0fe..7dec1903edad3146a0db8293784f988dcc45ce13 100644 (file)
@@ -26,8 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        ClientActiveObject
 */
 
-ClientActiveObject::ClientActiveObject(u16 id):
-       ActiveObject(id)
+ClientActiveObject::ClientActiveObject(u16 id, IGameDef *gamedef):
+       ActiveObject(id),
+       m_gamedef(gamedef)
 {
 }
 
@@ -36,7 +37,7 @@ ClientActiveObject::~ClientActiveObject()
        removeFromScene();
 }
 
-ClientActiveObject* ClientActiveObject::create(u8 type)
+ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef)
 {
        // Find factory function
        core::map<u16, Factory>::Node *n;
@@ -50,7 +51,7 @@ ClientActiveObject* ClientActiveObject::create(u8 type)
        }
 
        Factory f = n->getValue();
-       ClientActiveObject *object = (*f)();
+       ClientActiveObject *object = (*f)(gamedef);
        return object;
 }