summaryrefslogtreecommitdiff
path: root/src/serverobject.h
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.h
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.h')
-rw-r--r--src/serverobject.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/serverobject.h b/src/serverobject.h
index 1d1888580..241458193 100644
--- a/src/serverobject.h
+++ b/src/serverobject.h
@@ -87,10 +87,12 @@ public:
// Number of players which know about this object
u16 m_known_by_count;
/*
- Whether this object is to be removed when nobody knows about
- it anymore.
- Removal is delayed to preserve the id for the time during which
- it could be confused to some other object by some client.
+ - Whether this object is to be removed when nobody knows about
+ it anymore.
+ - Removal is delayed to preserve the id for the time during which
+ it could be confused to some other object by some client.
+ - This is set to true by the step() method when the object wants
+ to be deleted.
*/
bool m_removed;
@@ -113,5 +115,20 @@ private:
float m_age;
};
+class ItemSAO : public ServerActiveObject
+{
+public:
+ ItemSAO(ServerEnvironment *env, u16 id, v3f pos,
+ const std::string inventorystring);
+ u8 getType() const
+ {
+ return ACTIVEOBJECT_TYPE_ITEM;
+ }
+ void step(float dtime, Queue<ActiveObjectMessage> &messages);
+ std::string getClientInitializationData();
+private:
+ std::string m_inventorystring;
+};
+
#endif