+ // Find factory function
+ core::map<u16, Factory>::Node *n;
+ n = m_types.find(type);
+ if(n == NULL)
+ {
+ // If factory is not found, just return.
+ dstream<<"WARNING: ServerActiveObject: No factory for type="
+ <<type<<std::endl;
+ return NULL;
+ }
+
+ Factory f = n->getValue();
+ ServerActiveObject *object = (*f)(env, pos, data);
+ return object;