X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserverobject.cpp;h=2a007bda5a7d8e0795cae4524cba6fbbacd01d6a;hb=f97d4355beb79370d3bc69ea6baabb33ed90a8cd;hp=8acb35f6db84fefd601d03e8f4496dbb050f5c2c;hpb=3560f0de082a8950a84e2e866981f8bdfd05428a;p=dragonfireclient.git diff --git a/src/serverobject.cpp b/src/serverobject.cpp index 8acb35f6d..2a007bda5 100644 --- a/src/serverobject.cpp +++ b/src/serverobject.cpp @@ -21,10 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "inventory.h" -core::map 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), @@ -39,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) @@ -55,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; }