diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-08 00:47:14 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-08 00:47:14 +0300 |
commit | 4b54b291ae2ba5a5f214cadad74f0bed29376f84 (patch) | |
tree | f386ca435350867508333d95f3e9f5537fbd28a1 /src/serverobject.cpp | |
parent | 2dba606e1217ffb236e19aa38157a945e919d76b (diff) | |
download | minetest-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.cpp | 31 |
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; +} + |