diff options
author | red-001 <red-001@outlook.ie> | 2017-04-22 12:59:02 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-22 13:59:02 +0200 |
commit | 0c34fe20a101f3e9297b3ffab4e8b736a55a558f (patch) | |
tree | 787ec85836e3aa9f4a32bc56c12c065ab71f6946 /src | |
parent | 4c03190ce80457f19f87f9a3a6b4b03fb4f08ee1 (diff) | |
download | minetest-0c34fe20a101f3e9297b3ffab4e8b736a55a558f.tar.gz minetest-0c34fe20a101f3e9297b3ffab4e8b736a55a558f.tar.bz2 minetest-0c34fe20a101f3e9297b3ffab4e8b736a55a558f.zip |
Network:Remove old opcodes and fix documentation. (#5573)
Diffstat (limited to 'src')
-rw-r--r-- | src/client.h | 3 | ||||
-rw-r--r-- | src/network/clientopcodes.cpp | 6 | ||||
-rw-r--r-- | src/network/clientpackethandler.cpp | 15 | ||||
-rw-r--r-- | src/network/networkprotocol.h | 4 | ||||
-rw-r--r-- | src/network/serveropcodes.cpp | 2 | ||||
-rw-r--r-- | src/network/serverpackethandler.cpp | 4 | ||||
-rw-r--r-- | src/server.h | 1 |
7 files changed, 7 insertions, 28 deletions
diff --git a/src/client.h b/src/client.h index c55d7bcd5..5dc3f9bc8 100644 --- a/src/client.h +++ b/src/client.h @@ -311,13 +311,10 @@ public: void handleCommand_HP(NetworkPacket* pkt); void handleCommand_Breath(NetworkPacket* pkt); void handleCommand_MovePlayer(NetworkPacket* pkt); - void handleCommand_PlayerItem(NetworkPacket* pkt); void handleCommand_DeathScreen(NetworkPacket* pkt); void handleCommand_AnnounceMedia(NetworkPacket* pkt); void handleCommand_Media(NetworkPacket* pkt); - void handleCommand_ToolDef(NetworkPacket* pkt); void handleCommand_NodeDef(NetworkPacket* pkt); - void handleCommand_CraftItemDef(NetworkPacket* pkt); void handleCommand_ItemDef(NetworkPacket* pkt); void handleCommand_PlaySound(NetworkPacket* pkt); void handleCommand_StopSound(NetworkPacket* pkt); diff --git a/src/network/clientopcodes.cpp b/src/network/clientopcodes.cpp index cee402acd..563baf77b 100644 --- a/src/network/clientopcodes.cpp +++ b/src/network/clientopcodes.cpp @@ -78,12 +78,12 @@ const ToClientCommandHandler toClientCommandTable[TOCLIENT_NUM_MSG_TYPES] = { "TOCLIENT_HP", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HP }, // 0x33 { "TOCLIENT_MOVE_PLAYER", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_MovePlayer }, // 0x34 { "TOCLIENT_ACCESS_DENIED_LEGACY", TOCLIENT_STATE_NOT_CONNECTED, &Client::handleCommand_AccessDenied }, // 0x35 - { "TOCLIENT_PLAYERITEM", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_PlayerItem }, // 0x36 + null_command_handler, { "TOCLIENT_DEATHSCREEN", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_DeathScreen }, // 0x37 { "TOCLIENT_MEDIA", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Media }, // 0x38 - { "TOCLIENT_TOOLDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ToolDef }, // 0x39 + null_command_handler, { "TOCLIENT_NODEDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_NodeDef }, // 0x3a - { "TOCLIENT_CRAFTITEMDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_CraftItemDef }, // 0x3b + null_command_handler, { "TOCLIENT_ANNOUNCE_MEDIA", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_AnnounceMedia }, // 0x3c { "TOCLIENT_ITEMDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ItemDef }, // 0x3d null_command_handler, diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 19f8bbf58..42c49be3c 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -587,11 +587,6 @@ void Client::handleCommand_MovePlayer(NetworkPacket* pkt) m_ignore_damage_timer = 3.0; } -void Client::handleCommand_PlayerItem(NetworkPacket* pkt) -{ - warningstream << "Client: Ignoring TOCLIENT_PLAYERITEM" << std::endl; -} - void Client::handleCommand_DeathScreen(NetworkPacket* pkt) { bool set_camera_point_target; @@ -718,11 +713,6 @@ void Client::handleCommand_Media(NetworkPacket* pkt) } } -void Client::handleCommand_ToolDef(NetworkPacket* pkt) -{ - warningstream << "Client: Ignoring TOCLIENT_TOOLDEF" << std::endl; -} - void Client::handleCommand_NodeDef(NetworkPacket* pkt) { infostream << "Client: Received node definitions: packet size: " @@ -743,11 +733,6 @@ void Client::handleCommand_NodeDef(NetworkPacket* pkt) m_nodedef_received = true; } -void Client::handleCommand_CraftItemDef(NetworkPacket* pkt) -{ - warningstream << "Client: Ignoring TOCLIENT_CRAFTITEMDEF" << std::endl; -} - void Client::handleCommand_ItemDef(NetworkPacket* pkt) { infostream << "Client: Received item definitions: packet size: " diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index b586fa70b..cf60b3a10 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -50,6 +50,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ContentFeatures and NodeDefManager use a different serialization format; better for future version cross-compatibility Many things + Obsolete TOCLIENT_PLAYERITEM PROTOCOL_VERSION 10: TOCLIENT_PRIVILEGES Version raised to force 'fly' and 'fast' privileges into effect. @@ -104,7 +105,8 @@ with this program; if not, write to the Free Software Foundation, Inc., PROTOCOL_VERSION 22: add swap_node PROTOCOL_VERSION 23: - TOSERVER_CLIENT_READY + Obsolete TOSERVER_RECEIVED_MEDIA + Add TOSERVER_CLIENT_READY PROTOCOL_VERSION 24: ContentFeatures version 7 ContentFeatures: change number of special tiles to 6 (CF_SPECIAL_COUNT) diff --git a/src/network/serveropcodes.cpp b/src/network/serveropcodes.cpp index 642dd376a..7133259e0 100644 --- a/src/network/serveropcodes.cpp +++ b/src/network/serveropcodes.cpp @@ -89,7 +89,7 @@ const ToServerCommandHandler toServerCommandTable[TOSERVER_NUM_MSG_TYPES] = null_command_handler, // 0x3e null_command_handler, // 0x3f { "TOSERVER_REQUEST_MEDIA", TOSERVER_STATE_STARTUP, &Server::handleCommand_RequestMedia }, // 0x40 - { "TOSERVER_RECEIVED_MEDIA", TOSERVER_STATE_STARTUP, &Server::handleCommand_ReceivedMedia }, // 0x41 + null_command_handler, // 0x41 { "TOSERVER_BREATH", TOSERVER_STATE_INGAME, &Server::handleCommand_Deprecated }, // 0x42 Old breath model which is now deprecated for anticheating { "TOSERVER_CLIENT_READY", TOSERVER_STATE_STARTUP, &Server::handleCommand_ClientReady }, // 0x43 null_command_handler, // 0x44 diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 174b827f0..c284cb6c8 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -674,10 +674,6 @@ void Server::handleCommand_RequestMedia(NetworkPacket* pkt) sendRequestedMedia(pkt->getPeerId(), tosend); } -void Server::handleCommand_ReceivedMedia(NetworkPacket* pkt) -{ -} - void Server::handleCommand_ClientReady(NetworkPacket* pkt) { u16 peer_id = pkt->getPeerId(); diff --git a/src/server.h b/src/server.h index e2445f833..4183bcda1 100644 --- a/src/server.h +++ b/src/server.h @@ -174,7 +174,6 @@ public: void handleCommand_Init_Legacy(NetworkPacket* pkt); void handleCommand_Init2(NetworkPacket* pkt); void handleCommand_RequestMedia(NetworkPacket* pkt); - void handleCommand_ReceivedMedia(NetworkPacket* pkt); void handleCommand_ClientReady(NetworkPacket* pkt); void handleCommand_GotBlocks(NetworkPacket* pkt); void handleCommand_PlayerPos(NetworkPacket* pkt); |