summaryrefslogtreecommitdiff
path: root/src/serverobject.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-08 00:47:14 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-08 00:47:14 +0300
commit4b54b291ae2ba5a5f214cadad74f0bed29376f84 (patch)
treef386ca435350867508333d95f3e9f5537fbd28a1 /src/serverobject.cpp
parent2dba606e1217ffb236e19aa38157a945e919d76b (diff)
downloadminetest-4b54b291ae2ba5a5f214cadad74f0bed29376f84.tar.gz
minetest-4b54b291ae2ba5a5f214cadad74f0bed29376f84.tar.bz2
minetest-4b54b291ae2ba5a5f214cadad74f0bed29376f84.zip
Some progress on transitioning from MapBlockObject to ActiveObject.
Diffstat (limited to 'src/serverobject.cpp')
-rw-r--r--src/serverobject.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/serverobject.cpp b/src/serverobject.cpp
index 48d487ab0..3645f7666 100644
--- a/src/serverobject.cpp
+++ b/src/serverobject.cpp
@@ -80,4 +80,35 @@ void TestSAO::step(float dtime, Queue<ActiveObjectMessage> &messages)
}
+/*
+ ItemSAO
+*/
+
+ItemSAO::ItemSAO(ServerEnvironment *env, u16 id, v3f pos,
+ const std::string inventorystring):
+ ServerActiveObject(env, id, pos),
+ m_inventorystring(inventorystring)
+{
+ dstream<<"Server: ItemSAO created with inventorystring=\""
+ <<m_inventorystring<<"\""<<std::endl;
+}
+
+void ItemSAO::step(float dtime, Queue<ActiveObjectMessage> &messages)
+{
+}
+
+std::string ItemSAO::getClientInitializationData()
+{
+ dstream<<__FUNCTION_NAME<<std::endl;
+ std::string data;
+ data += itos(m_base_position.X);
+ data += ",";
+ data += itos(m_base_position.Y);
+ data += ",";
+ data += itos(m_base_position.Z);
+ data += ":";
+ data += m_inventorystring;
+ return data;
+}
+