]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/serverobject.cpp
Fix script error reporting a bit
[dragonfireclient.git] / src / serverobject.cpp
index 8acb35f6db84fefd601d03e8f4496dbb050f5c2c..ca3d2c3b98d2790de87d64905446a6fb0e273e99 100644 (file)
@@ -20,11 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "serverobject.h"
 #include <fstream>
 #include "inventory.h"
+#include "tooldef.h"
 
-core::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
-
-ServerActiveObject::ServerActiveObject(ServerEnvironment *env, u16 id, v3f pos):
-       ActiveObject(id),
+ServerActiveObject::ServerActiveObject(ServerEnvironment *env, v3f pos):
+       ActiveObject(0),
        m_known_by_count(0),
        m_removed(false),
        m_pending_deactivation(false),
@@ -55,7 +54,7 @@ ServerActiveObject* ServerActiveObject::create(u8 type,
        }
 
        Factory f = n->getValue();
-       ServerActiveObject *object = (*f)(env, id, pos, data);
+       ServerActiveObject *object = (*f)(env, pos, data);
        return object;
 }
 
@@ -68,5 +67,10 @@ void ServerActiveObject::registerType(u16 type, Factory f)
        m_types.insert(type, f);
 }
 
+void ServerActiveObject::getWieldDiggingProperties(ToolDiggingProperties *dst)
+{
+       *dst = ToolDiggingProperties();
+}
+