-class TestSAO : public ServerActiveObject
-{
-public:
- TestSAO(ServerEnvironment *env, u16 id, v3f pos);
- u8 getType() const
- {return ACTIVEOBJECT_TYPE_TEST;}
- static ServerActiveObject* create(ServerEnvironment *env, u16 id, v3f pos,
- const std::string &data);
- void step(float dtime, Queue<ActiveObjectMessage> &messages,
- bool send_recommended);
-private:
- float m_timer1;
- 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;}
- static ServerActiveObject* create(ServerEnvironment *env, u16 id, v3f pos,
- const std::string &data);
- void step(float dtime, Queue<ActiveObjectMessage> &messages,
- bool send_recommended);
- std::string getClientInitializationData();
- std::string getStaticData();
- InventoryItem* createInventoryItem();
- InventoryItem* createPickedUpItem(){return createInventoryItem();}
-private:
- std::string m_inventorystring;
- v3f m_speed_f;
- v3f m_last_sent_position;
-};
-
-class RatSAO : public ServerActiveObject
-{
-public:
- RatSAO(ServerEnvironment *env, u16 id, v3f pos);
- u8 getType() const
- {return ACTIVEOBJECT_TYPE_RAT;}
- static ServerActiveObject* create(ServerEnvironment *env, u16 id, v3f pos,
- const std::string &data);
- void step(float dtime, Queue<ActiveObjectMessage> &messages,
- bool send_recommended);
- std::string getClientInitializationData();
- std::string getStaticData();
- InventoryItem* createPickedUpItem();
-private:
- v3f m_speed_f;
- v3f m_oldpos;
- v3f m_last_sent_position;
- float m_yaw;
- float m_counter1;
- float m_counter2;
- float m_age;
- bool m_touching_ground;
-};
-