Network:Remove old opcodes and fix documentation. (#5573)
parent
4c03190ce8
commit
0c34fe20a1
|
@ -311,13 +311,10 @@ public:
|
||||||
void handleCommand_HP(NetworkPacket* pkt);
|
void handleCommand_HP(NetworkPacket* pkt);
|
||||||
void handleCommand_Breath(NetworkPacket* pkt);
|
void handleCommand_Breath(NetworkPacket* pkt);
|
||||||
void handleCommand_MovePlayer(NetworkPacket* pkt);
|
void handleCommand_MovePlayer(NetworkPacket* pkt);
|
||||||
void handleCommand_PlayerItem(NetworkPacket* pkt);
|
|
||||||
void handleCommand_DeathScreen(NetworkPacket* pkt);
|
void handleCommand_DeathScreen(NetworkPacket* pkt);
|
||||||
void handleCommand_AnnounceMedia(NetworkPacket* pkt);
|
void handleCommand_AnnounceMedia(NetworkPacket* pkt);
|
||||||
void handleCommand_Media(NetworkPacket* pkt);
|
void handleCommand_Media(NetworkPacket* pkt);
|
||||||
void handleCommand_ToolDef(NetworkPacket* pkt);
|
|
||||||
void handleCommand_NodeDef(NetworkPacket* pkt);
|
void handleCommand_NodeDef(NetworkPacket* pkt);
|
||||||
void handleCommand_CraftItemDef(NetworkPacket* pkt);
|
|
||||||
void handleCommand_ItemDef(NetworkPacket* pkt);
|
void handleCommand_ItemDef(NetworkPacket* pkt);
|
||||||
void handleCommand_PlaySound(NetworkPacket* pkt);
|
void handleCommand_PlaySound(NetworkPacket* pkt);
|
||||||
void handleCommand_StopSound(NetworkPacket* pkt);
|
void handleCommand_StopSound(NetworkPacket* pkt);
|
||||||
|
|
|
@ -78,12 +78,12 @@ const ToClientCommandHandler toClientCommandTable[TOCLIENT_NUM_MSG_TYPES] =
|
||||||
{ "TOCLIENT_HP", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HP }, // 0x33
|
{ "TOCLIENT_HP", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_HP }, // 0x33
|
||||||
{ "TOCLIENT_MOVE_PLAYER", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_MovePlayer }, // 0x34
|
{ "TOCLIENT_MOVE_PLAYER", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_MovePlayer }, // 0x34
|
||||||
{ "TOCLIENT_ACCESS_DENIED_LEGACY", TOCLIENT_STATE_NOT_CONNECTED, &Client::handleCommand_AccessDenied }, // 0x35
|
{ "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_DEATHSCREEN", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_DeathScreen }, // 0x37
|
||||||
{ "TOCLIENT_MEDIA", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_Media }, // 0x38
|
{ "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_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_ANNOUNCE_MEDIA", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_AnnounceMedia }, // 0x3c
|
||||||
{ "TOCLIENT_ITEMDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ItemDef }, // 0x3d
|
{ "TOCLIENT_ITEMDEF", TOCLIENT_STATE_CONNECTED, &Client::handleCommand_ItemDef }, // 0x3d
|
||||||
null_command_handler,
|
null_command_handler,
|
||||||
|
|
|
@ -587,11 +587,6 @@ void Client::handleCommand_MovePlayer(NetworkPacket* pkt)
|
||||||
m_ignore_damage_timer = 3.0;
|
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)
|
void Client::handleCommand_DeathScreen(NetworkPacket* pkt)
|
||||||
{
|
{
|
||||||
bool set_camera_point_target;
|
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)
|
void Client::handleCommand_NodeDef(NetworkPacket* pkt)
|
||||||
{
|
{
|
||||||
infostream << "Client: Received node definitions: packet size: "
|
infostream << "Client: Received node definitions: packet size: "
|
||||||
|
@ -743,11 +733,6 @@ void Client::handleCommand_NodeDef(NetworkPacket* pkt)
|
||||||
m_nodedef_received = true;
|
m_nodedef_received = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::handleCommand_CraftItemDef(NetworkPacket* pkt)
|
|
||||||
{
|
|
||||||
warningstream << "Client: Ignoring TOCLIENT_CRAFTITEMDEF" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client::handleCommand_ItemDef(NetworkPacket* pkt)
|
void Client::handleCommand_ItemDef(NetworkPacket* pkt)
|
||||||
{
|
{
|
||||||
infostream << "Client: Received item definitions: packet size: "
|
infostream << "Client: Received item definitions: packet size: "
|
||||||
|
|
|
@ -50,6 +50,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
ContentFeatures and NodeDefManager use a different serialization
|
ContentFeatures and NodeDefManager use a different serialization
|
||||||
format; better for future version cross-compatibility
|
format; better for future version cross-compatibility
|
||||||
Many things
|
Many things
|
||||||
|
Obsolete TOCLIENT_PLAYERITEM
|
||||||
PROTOCOL_VERSION 10:
|
PROTOCOL_VERSION 10:
|
||||||
TOCLIENT_PRIVILEGES
|
TOCLIENT_PRIVILEGES
|
||||||
Version raised to force 'fly' and 'fast' privileges into effect.
|
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:
|
PROTOCOL_VERSION 22:
|
||||||
add swap_node
|
add swap_node
|
||||||
PROTOCOL_VERSION 23:
|
PROTOCOL_VERSION 23:
|
||||||
TOSERVER_CLIENT_READY
|
Obsolete TOSERVER_RECEIVED_MEDIA
|
||||||
|
Add TOSERVER_CLIENT_READY
|
||||||
PROTOCOL_VERSION 24:
|
PROTOCOL_VERSION 24:
|
||||||
ContentFeatures version 7
|
ContentFeatures version 7
|
||||||
ContentFeatures: change number of special tiles to 6 (CF_SPECIAL_COUNT)
|
ContentFeatures: change number of special tiles to 6 (CF_SPECIAL_COUNT)
|
||||||
|
|
|
@ -89,7 +89,7 @@ const ToServerCommandHandler toServerCommandTable[TOSERVER_NUM_MSG_TYPES] =
|
||||||
null_command_handler, // 0x3e
|
null_command_handler, // 0x3e
|
||||||
null_command_handler, // 0x3f
|
null_command_handler, // 0x3f
|
||||||
{ "TOSERVER_REQUEST_MEDIA", TOSERVER_STATE_STARTUP, &Server::handleCommand_RequestMedia }, // 0x40
|
{ "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_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
|
{ "TOSERVER_CLIENT_READY", TOSERVER_STATE_STARTUP, &Server::handleCommand_ClientReady }, // 0x43
|
||||||
null_command_handler, // 0x44
|
null_command_handler, // 0x44
|
||||||
|
|
|
@ -674,10 +674,6 @@ void Server::handleCommand_RequestMedia(NetworkPacket* pkt)
|
||||||
sendRequestedMedia(pkt->getPeerId(), tosend);
|
sendRequestedMedia(pkt->getPeerId(), tosend);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Server::handleCommand_ReceivedMedia(NetworkPacket* pkt)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Server::handleCommand_ClientReady(NetworkPacket* pkt)
|
void Server::handleCommand_ClientReady(NetworkPacket* pkt)
|
||||||
{
|
{
|
||||||
u16 peer_id = pkt->getPeerId();
|
u16 peer_id = pkt->getPeerId();
|
||||||
|
|
|
@ -174,7 +174,6 @@ public:
|
||||||
void handleCommand_Init_Legacy(NetworkPacket* pkt);
|
void handleCommand_Init_Legacy(NetworkPacket* pkt);
|
||||||
void handleCommand_Init2(NetworkPacket* pkt);
|
void handleCommand_Init2(NetworkPacket* pkt);
|
||||||
void handleCommand_RequestMedia(NetworkPacket* pkt);
|
void handleCommand_RequestMedia(NetworkPacket* pkt);
|
||||||
void handleCommand_ReceivedMedia(NetworkPacket* pkt);
|
|
||||||
void handleCommand_ClientReady(NetworkPacket* pkt);
|
void handleCommand_ClientReady(NetworkPacket* pkt);
|
||||||
void handleCommand_GotBlocks(NetworkPacket* pkt);
|
void handleCommand_GotBlocks(NetworkPacket* pkt);
|
||||||
void handleCommand_PlayerPos(NetworkPacket* pkt);
|
void handleCommand_PlayerPos(NetworkPacket* pkt);
|
||||||
|
|
Loading…
Reference in New Issue