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_sao.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/content_sao.cpp') diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 8a0e67a21..3802129cb 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -1495,6 +1495,7 @@ void MobV2SAO::doDamage(u16 d) */ #include "scriptapi.h" +#include "luaentity_common.h" // Prototype LuaEntitySAO proto_LuaEntitySAO(NULL, v3f(0,0,0), "_prototype", ""); @@ -1527,14 +1528,13 @@ void LuaEntitySAO::addedToEnvironment(u16 id) { ServerActiveObject::addedToEnvironment(id); - // Create entity by name and state + // Create entity from name and state m_registered = true; lua_State *L = m_env->getLua(); scriptapi_luaentity_add(L, id, m_init_name.c_str(), m_init_state.c_str()); // Get properties - *m_prop = scriptapi_luaentity_get_properties(L, m_id); - infostream<<"m_prop->visual="<visual<serialize(prop_os); + os<