diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-05-16 19:39:15 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-05-16 19:39:15 +0300 |
commit | 94c9686020798c8ec8113c242dc1dfe0c2accf71 (patch) | |
tree | 7390a7dc47939a5cbf30d9e38a7a3ccb5e52db86 /src/server.h | |
parent | 1c3a85fa54079c0676df520d32f2c414133c2bf1 (diff) | |
parent | b3268ff3896097abdd9199e4bb8ee826afda8388 (diff) | |
download | minetest-94c9686020798c8ec8113c242dc1dfe0c2accf71.tar.gz minetest-94c9686020798c8ec8113c242dc1dfe0c2accf71.tar.bz2 minetest-94c9686020798c8ec8113c242dc1dfe0c2accf71.zip |
merged CiaranG's changes (player privileges)
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/server.h b/src/server.h index 4603f98ed..d8b47aef9 100644 --- a/src/server.h +++ b/src/server.h @@ -387,6 +387,12 @@ public: return time_to_daynight_ratio(m_time_of_day.get()); } + void setTimeOfDay(u32 time) + { + m_time_of_day.set(time); + m_time_of_day_send_timer = 0; + } + bool getShutdownRequested() { return m_shutdown_requested.get(); @@ -405,6 +411,19 @@ public: Inventory* getInventory(InventoryContext *c, std::string id); void inventoryModified(InventoryContext *c, std::string id); + // Connection must be locked when called + std::wstring getStatusString(); + + void requestShutdown(void) + { + m_shutdown_requested.set(true); + } + + + // Envlock and conlock should be locked when calling this + void SendMovePlayer(Player *player); + + private: // Virtual methods from con::PeerHandler. @@ -429,7 +448,6 @@ private: void SendChatMessage(u16 peer_id, const std::wstring &message); void BroadcastChatMessage(const std::wstring &message); void SendPlayerHP(Player *player); - void SendMovePlayer(Player *player); /* Send a node removal/addition event to all clients except ignore_id. Additionally, if far_players!=NULL, players further away than @@ -455,9 +473,6 @@ private: // When called, connection mutex should be locked RemoteClient* getClient(u16 peer_id); - // Connection must be locked when called - std::wstring getStatusString(); - /* Get a player from memory or creates one. If player is already connected, return NULL |