summaryrefslogtreecommitdiff
path: root/src/network/serveropcodes.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-13 14:14:48 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-13 14:28:20 +0100
commit9f3fc7201beedc66f974d54415b8e3fedb13ccb3 (patch)
tree2c4920975d365ff1531b0fbf84fe1b94f4883f71 /src/network/serveropcodes.cpp
parent126f36c2e6c153f2791db743a8ceca44b6b36b10 (diff)
downloadminetest-9f3fc7201beedc66f974d54415b8e3fedb13ccb3.tar.gz
minetest-9f3fc7201beedc66f974d54415b8e3fedb13ccb3.tar.bz2
minetest-9f3fc7201beedc66f974d54415b8e3fedb13ccb3.zip
Handle the newly added TOCLIENT_ACCESS_DENIED and TOCLIENT_DELETE_PARTICLESPAWNER
* Rename the handlers from _Legacy to regular, because here we can use same handlers * Fix some packet names and pseudo handlers
Diffstat (limited to 'src/network/serveropcodes.cpp')
-rw-r--r--src/network/serveropcodes.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/network/serveropcodes.cpp b/src/network/serveropcodes.cpp
index d3cf5c1b6..cecabf7a8 100644
--- a/src/network/serveropcodes.cpp
+++ b/src/network/serveropcodes.cpp
@@ -24,7 +24,7 @@ const static ToServerCommandHandler null_command_handler = { "TOSERVER_NULL", TO
const ToServerCommandHandler toServerCommandTable[TOSERVER_NUM_MSG_TYPES] =
{
- null_command_handler, // 0x00
+ null_command_handler, // 0x00 (never use this)
null_command_handler, // 0x01
null_command_handler, // 0x02
null_command_handler, // 0x03
@@ -40,7 +40,7 @@ const ToServerCommandHandler toServerCommandTable[TOSERVER_NUM_MSG_TYPES] =
null_command_handler, // 0x0d
null_command_handler, // 0x0e
null_command_handler, // 0x0f
- { "TOSERVER_INIT_LEGACY", TOSERVER_STATE_NOT_CONNECTED, &Server::handleCommand_Init_Legacy }, // 0x10
+ { "TOSERVER_INIT_LEGACY", TOSERVER_STATE_NOT_CONNECTED, &Server::handleCommand_Init_Legacy }, // 0x10
{ "TOSERVER_INIT2", TOSERVER_STATE_NOT_CONNECTED, &Server::handleCommand_Init2 }, // 0x11
null_command_handler, // 0x12
null_command_handler, // 0x13
@@ -98,23 +98,23 @@ const static ClientCommandFactory null_command_factory = { "TOCLIENT_NULL", 0, f
const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] =
{
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- null_command_factory,
- { "TOCLIENT_INIT", 0, true }, // 0x10
+ null_command_factory, // 0x00
+ null_command_factory, // 0x01
+ null_command_factory, // 0x02
+ null_command_factory, // 0x03
+ null_command_factory, // 0x04
+ null_command_factory, // 0x05
+ null_command_factory, // 0x06
+ null_command_factory, // 0x07
+ null_command_factory, // 0x08
+ null_command_factory, // 0x09
+ { "TOCLIENT_ACCESS_DENIED", 0, true }, // 0x0A
+ null_command_factory, // 0x0B
+ null_command_factory, // 0x0C
+ null_command_factory, // 0x0D
+ null_command_factory, // 0x0E
+ null_command_factory, // 0x0F
+ { "TOCLIENT_INIT", 0, true }, // 0x10
null_command_factory,
null_command_factory,
null_command_factory,
@@ -151,7 +151,7 @@ const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] =
{ "TOCLIENT_ACTIVE_OBJECT_MESSAGES", 0, true }, // 0x32 Special packet, sent by 0 (rel) and 1 (unrel) channel
{ "TOCLIENT_HP", 0, true }, // 0x33
{ "TOCLIENT_MOVE_PLAYER", 0, true }, // 0x34
- { "TOCLIENT_ACCESS_DENIED_LEGACY", 0, true }, // 0x35
+ { "TOCLIENT_ACCESS_DENIED_LEGACY", 0, true }, // 0x35
{ "TOCLIENT_PLAYERITEM", 0, false }, // 0x36 obsolete
{ "TOCLIENT_DEATHSCREEN", 0, true }, // 0x37
{ "TOCLIENT_MEDIA", 2, true }, // 0x38
@@ -181,4 +181,5 @@ const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] =
{ "TOCLIENT_OVERRIDE_DAY_NIGHT_RATIO", 0, true }, // 0x50
{ "TOCLIENT_LOCAL_PLAYER_ANIMATIONS", 0, true }, // 0x51
{ "TOCLIENT_EYE_OFFSET", 0, true }, // 0x52
+ { "TOCLIENT_DELETE_PARTICLESPAWNER", 0, true }, // 0x53
};