+#include "luaentity_common.h"
+
+// Prototype (registers item for deserialization)
+LuaEntitySAO proto_LuaEntitySAO(NULL, v3f(0,0,0), "_prototype", "");
+
+LuaEntitySAO::LuaEntitySAO(ServerEnvironment *env, v3f pos,
+ const std::string &name, const std::string &state):
+ ServerActiveObject(env, pos),
+ m_init_name(name),
+ m_init_state(state),
+ m_registered(false),
+ m_prop(new LuaEntityProperties),
+ m_hp(-1),
+ m_velocity(0,0,0),
+ m_acceleration(0,0,0),
+ m_yaw(0),
+ m_properties_sent(true),
+ m_last_sent_yaw(0),
+ m_last_sent_position(0,0,0),
+ m_last_sent_velocity(0,0,0),
+ m_last_sent_position_timer(0),
+ m_last_sent_move_precision(0),
+ m_armor_groups_sent(false)
+{
+ // Only register type if no environment supplied
+ if(env == NULL){
+ ServerActiveObject::registerType(getType(), create);
+ return;
+ }
+
+ // Initialize something to armor groups
+ m_armor_groups["fleshy"] = 3;
+ m_armor_groups["snappy"] = 2;
+}