mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Some progress on transitioning from MapBlockObject to ActiveObject.
This commit is contained in:
parent
2dba606e12
commit
4b54b291ae
13 changed files with 522 additions and 40 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue