aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-01 18:23:58 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-01 18:23:58 +0200
commitee0d3bacbce612c1abc6016cb7b0d684df25b820 (patch)
treec11c0960cd3a70a795d089c0d2cf3592d4c68fb7 /src/content_sao.h
parent9dcfa882b13cdbe38b66fc1b61643da74f112342 (diff)
downloadminetest-ee0d3bacbce612c1abc6016cb7b0d684df25b820.tar.gz
minetest-ee0d3bacbce612c1abc6016cb7b0d684df25b820.tar.bz2
minetest-ee0d3bacbce612c1abc6016cb7b0d684df25b820.zip
Player-is-SAO WIP
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h25
1 files changed, 25 insertions, 0 deletions
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