]> git.lizzy.rs Git - minetest.git/blobdiff - src/client.h
Remove Android makefile ugly make -j hack
[minetest.git] / src / client.h
index 1c29aac1eb8861d5561510c09307e7866cff3e4e..ab584267822531038851c81d310af15de64306f3 100644 (file)
@@ -48,7 +48,6 @@ struct MapDrawControl;
 class MtEventManager;
 struct PointedThing;
 class Database;
-class Server;
 
 struct QueuedMeshUpdate
 {
@@ -350,7 +349,9 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
 
        void handleCommand_Null(NetworkPacket* pkt) {};
        void handleCommand_Deprecated(NetworkPacket* pkt);
-       void handleCommand_Init(NetworkPacket* pkt);
+       void handleCommand_Hello(NetworkPacket* pkt);
+       void handleCommand_AuthAccept(NetworkPacket* pkt);
+       void handleCommand_InitLegacy(NetworkPacket* pkt);
        void handleCommand_AccessDenied(NetworkPacket* pkt);
        void handleCommand_RemoveNode(NetworkPacket* pkt);
        void handleCommand_AddNode(NetworkPacket* pkt);
@@ -491,7 +492,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
 
        float mediaReceiveProgress();
 
-       void afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font);
+       void afterContentReceived(IrrlichtDevice *device);
 
        float getRTT(void);
        float getCurRate(void);
@@ -516,7 +517,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        // Insert a media file appropriately into the appropriate manager
        bool loadMedia(const std::string &data, const std::string &filename);
        // Send a request for conventional media transfer
-       void request_media(const std::list<std::string> &file_requests);
+       void request_media(const std::vector<std::string> &file_requests);
        // Send a notification that no conventional media transfer is needed
        void received_media();
 
@@ -541,6 +542,11 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        // Send the item number 'item' as player item to the server
        void sendPlayerItem(u16 item);
 
+       void sendLegacyInit(const char* playerName, const char* playerPassword);
+       void sendDeletedBlocks(std::vector<v3s16> &blocks);
+       void sendGotBlocks(v3s16 block);
+       void sendRemovedSounds(std::vector<s32> &soundList);
+
        float m_packetcounter_timer;
        float m_connection_reinit_timer;
        float m_avg_rtt_timer;
@@ -578,13 +584,13 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        // 0 <= m_daynight_i < DAYNIGHT_CACHE_COUNT
        //s32 m_daynight_i;
        //u32 m_daynight_ratio;
-       Queue<std::wstring> m_chat_queue;
+       std::queue<std::wstring> m_chat_queue;
        // The seed returned by the server in TOCLIENT_INIT is stored here
        u64 m_map_seed;
        std::string m_password;
        bool m_access_denied;
        std::wstring m_access_denied_reason;
-       Queue<ClientEvent> m_client_event_queue;
+       std::queue<ClientEvent> m_client_event_queue;
        bool m_itemdef_received;
        bool m_nodedef_received;
        ClientMediaDownloader *m_media_downloader;
@@ -620,8 +626,9 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        LocalClientState m_state;
 
        // Used for saving server map to disk client-side
-       Database *localdb;
-       Server *localserver;
+       Database *m_localdb;
+       IntervalLimiter m_localdb_save_interval;
+       u16 m_cache_save_interval;
 
        // TODO: Add callback to update these when g_settings changes
        bool m_cache_smooth_lighting;