From dcedfdacd1ba77591cdc0aa2b8c123c6a5ef2f5d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 12 Nov 2011 10:39:44 +0200 Subject: Scripting WIP --- src/content_cao.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'src/content_cao.cpp') diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 157a51886..70bcbac18 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -1268,6 +1268,8 @@ void MobV2CAO::setLooks(const std::string &looks) LuaEntityCAO */ +#include "luaentity_common.h" + // Prototype LuaEntityCAO proto_LuaEntityCAO; @@ -1275,13 +1277,15 @@ LuaEntityCAO::LuaEntityCAO(): ClientActiveObject(0), m_selection_box(-BS/3.,0.0,-BS/3., BS/3.,BS*2./3.,BS/3.), m_node(NULL), - m_position(v3f(0,10*BS,0)) + m_position(v3f(0,10*BS,0)), + m_prop(new LuaEntityProperties) { ClientActiveObject::registerType(getType(), create); } LuaEntityCAO::~LuaEntityCAO() { + delete m_prop; } ClientActiveObject* LuaEntityCAO::create() @@ -1398,16 +1402,19 @@ void LuaEntityCAO::initialize(const std::string &data) { infostream<<"LuaEntityCAO: Got init data"<deSerialize(prop_is); + + infostream<<"m_prop: "<dump()<