From ee0d3bacbce612c1abc6016cb7b0d684df25b820 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 1 Dec 2011 18:23:58 +0200 Subject: Player-is-SAO WIP --- src/content_sao.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/content_sao.h') diff --git a/src/content_sao.h b/src/content_sao.h index 428998799..19b0e74ba 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -240,5 +240,30 @@ private: float m_last_sent_move_precision; }; +class ServerRemotePlayer; + +class PlayerSAO : public ServerActiveObject +{ +public: + PlayerSAO(ServerEnvironment *env, v3f pos, + ServerRemotePlayer *player); + ~PlayerSAO(); + u8 getType() const + {return ACTIVEOBJECT_TYPE_PLAYER;} + void step(float dtime, bool send_recommended); + std::string getClientInitializationData(); + std::string getStaticData(); + bool isStaticAllowed() const + { return false; } + void punch(ServerActiveObject *puncher); + /* PlayerSAO-specific */ + void setPlayer(ServerRemotePlayer *player); + ServerRemotePlayer* getPlayer(); + void positionUpdated(); +private: + ServerRemotePlayer *m_player; + bool m_position_updated; +}; + #endif -- cgit v1.2.3