ClientActiveObject
*/
-core::map<u16, ClientActiveObject::Factory> ClientActiveObject::m_types;
-
-ClientActiveObject::ClientActiveObject(u16 id):
- ActiveObject(id)
+ClientActiveObject::ClientActiveObject(u16 id, IGameDef *gamedef):
+ ActiveObject(id),
+ m_gamedef(gamedef)
{
}
removeFromScene();
}
-ClientActiveObject* ClientActiveObject::create(u8 type)
+ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef)
{
// Find factory function
core::map<u16, Factory>::Node *n;
{
// If factory is not found, just return.
dstream<<"WARNING: ClientActiveObject: No factory for type="
- <<type<<std::endl;
+ <<(int)type<<std::endl;
return NULL;
}
Factory f = n->getValue();
- ClientActiveObject *object = (*f)();
+ ClientActiveObject *object = (*f)(gamedef);
return object;
}