From 91250c1078dc5dc5f48bba2b309920edd6cdfe68 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Sun, 9 Oct 2016 20:40:29 +0300 Subject: [PATCH] Fix crash on attaching player to entity Rename "refresh" to "processInitData" --- src/content_cao.cpp | 79 ++++++++++++++++++++++----------------------- src/content_cao.h | 2 ++ 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/src/content_cao.cpp b/src/content_cao.cpp index a8e03d670..88ed43a8c 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -613,45 +613,7 @@ bool GenericCAO::collideWithObjects() void GenericCAO::initialize(const std::string &data) { infostream<<"GenericCAO: Got init data"<getGenericCAO(child_id)) { - childobj->initialize(deSerializeLongString(is)); + childobj->processInitData(deSerializeLongString(is)); } else { m_env->addActiveObject(child_id, type, deSerializeLongString(is)); } diff --git a/src/content_cao.h b/src/content_cao.h index cf14a1e18..5b3471814 100644 --- a/src/content_cao.h +++ b/src/content_cao.h @@ -125,6 +125,8 @@ public: void initialize(const std::string &data); + void processInitData(const std::string &data); + ClientActiveObject *getParent(); bool getCollisionBox(aabb3f *toset);