diff options
Diffstat (limited to 'src/player.h')
-rw-r--r-- | src/player.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/player.h b/src/player.h index 0b9f014c1..fc87a5edd 100644 --- a/src/player.h +++ b/src/player.h @@ -97,6 +97,9 @@ public: virtual void updateLight(u8 light_at_pos) {}; + virtual bool isClientConnected() { return false; } + virtual void setClientConnected(bool) {} + bool touching_ground; bool in_water; @@ -115,22 +118,35 @@ protected: class ServerRemotePlayer : public Player { public: - ServerRemotePlayer() + ServerRemotePlayer(bool client_connected): + m_client_connected(client_connected) { } virtual ~ServerRemotePlayer() { } - bool isLocal() const + virtual bool isLocal() const { return false; } - void move(f32 dtime, Map &map) + virtual void move(f32 dtime, Map &map) + { + } + + virtual bool isClientConnected() + { + return m_client_connected; + } + virtual void setClientConnected(bool client_connected) { + m_client_connected = client_connected; } + // This + bool m_client_connected; + private: }; |