aboutsummaryrefslogtreecommitdiff
path: root/src/serverobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serverobject.cpp')
-rw-r--r--src/serverobject.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/serverobject.cpp b/src/serverobject.cpp
index ce19ea34f..2a007bda5 100644
--- a/src/serverobject.cpp
+++ b/src/serverobject.cpp
@@ -21,8 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <fstream>
#include "inventory.h"
-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),
@@ -37,6 +37,11 @@ ServerActiveObject::~ServerActiveObject()
{
}
+void ServerActiveObject::addedToEnvironment(u16 id)
+{
+ setId(id);
+}
+
ServerActiveObject* ServerActiveObject::create(u8 type,
ServerEnvironment *env, u16 id, v3f pos,
const std::string &data)
@@ -53,7 +58,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;
}