class MtEventManager;
struct PointedThing;
class Database;
-class Server;
struct QueuedMeshUpdate
{
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);
void handleCommand_LocalPlayerAnimations(NetworkPacket* pkt);
void handleCommand_EyeOffset(NetworkPacket* pkt);
- void ProcessData(u8 *data, u32 datasize, u16 sender_peer_id);
+ void ProcessData(NetworkPacket *pkt);
// Returns true if something was received
bool AsyncProcessPacket();
const std::map<std::string, std::string> &fields);
void sendInventoryAction(InventoryAction *a);
void sendChatMessage(const std::wstring &message);
- void sendChangePassword(const std::wstring &oldpassword,
- const std::wstring &newpassword);
+ void sendChangePassword(const std::string &oldpassword,
+ const std::string &newpassword);
void sendDamage(u8 damage);
void sendBreath(u16 breath);
void sendRespawn();
bool accessDenied()
{ return m_access_denied; }
- std::wstring accessDeniedReason()
+ std::string accessDeniedReason()
{ return m_access_denied_reason; }
bool itemdefReceived()
float mediaReceiveProgress();
- void afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font);
+ void afterContentReceived(IrrlichtDevice *device);
float getRTT(void);
float getCurRate(void);
// 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();
// 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;
bool m_inventory_updated;
Inventory *m_inventory_from_server;
float m_inventory_from_server_age;
- std::set<v3s16> m_active_blocks;
PacketCounter m_packetcounter;
bool m_show_highlighted;
// Block mesh animation parameters
u64 m_map_seed;
std::string m_password;
bool m_access_denied;
- std::wstring m_access_denied_reason;
+ std::string m_access_denied_reason;
std::queue<ClientEvent> m_client_event_queue;
bool m_itemdef_received;
bool m_nodedef_received;
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;