Skip to content

Commit

Permalink
Merge pull request ddnet#7026 from ChillerDragon/pr_auth_unused
Browse files Browse the repository at this point in the history
NETMSG_AUTH_CHALLENGE is not used in 0.6 or 0.7
  • Loading branch information
def- authored Aug 22, 2023
2 parents afbb95f + 87640d7 commit 5578981
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions datasrc/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
]),

NetMessage("Sv_TuneParams", []),
NetMessage("Sv_ExtraProjectile", []),
NetMessage("Unused", []),
NetMessage("Sv_ReadyToEnter", []),

NetMessage("Sv_WeaponPickup", [
Expand Down Expand Up @@ -509,7 +509,7 @@
NetIntAny("m_PlayerTimeBest"),
]),

NetMessage("Unused", []),
NetMessage("Unused2", []),

NetMessage("Sv_TeamsStateLegacy", []),

Expand Down
2 changes: 1 addition & 1 deletion datasrc/seven/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
]),

NetMessage("Sv_TuneParams", []),
NetMessage("Sv_ExtraProjectile", []),
NetMessage("Unused", []),
NetMessage("Sv_ReadyToEnter", []),

NetMessage("Sv_WeaponPickup", [
Expand Down
4 changes: 1 addition & 3 deletions src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,7 @@ static inline bool RepackMsg(const CMsgPacker *pMsg, CPacker &Packer, bool Sixup
MsgId += 1;
else if(MsgId == NETMSG_RCON_LINE)
MsgId = protocol7::NETMSG_RCON_LINE;
else if(MsgId >= NETMSG_AUTH_CHALLENGE && MsgId <= NETMSG_AUTH_RESULT)
MsgId += 4;
else if(MsgId >= NETMSG_PING && MsgId <= NETMSG_ERROR)
else if(MsgId >= NETMSG_PING && MsgId <= NETMSG_PING_REPLY)
MsgId += 4;
else if(MsgId >= NETMSG_RCON_CMD_ADD && MsgId <= NETMSG_RCON_CMD_REM)
MsgId -= 11;
Expand Down
10 changes: 5 additions & 5 deletions src/engine/shared/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ enum
NETMSG_RCON_AUTH_STATUS, // result of the authentication
NETMSG_RCON_LINE, // line that should be printed to the remote console

NETMSG_AUTH_CHALLENGE, //
NETMSG_AUTH_RESULT, //
NETMSG_UNUSED1,
NETMSG_UNUSED2,

// sent by client
NETMSG_READY, //
Expand All @@ -58,13 +58,13 @@ enum
NETMSG_RCON_AUTH, //
NETMSG_REQUEST_MAP_DATA, //

NETMSG_AUTH_START, //
NETMSG_AUTH_RESPONSE, //
NETMSG_UNUSED3,
NETMSG_UNUSED4,

// sent by both
NETMSG_PING,
NETMSG_PING_REPLY,
NETMSG_ERROR,
NETMSG_UNUSED5,

// sent by server (todo: move it up)
NETMSG_RCON_CMD_ADD,
Expand Down
10 changes: 5 additions & 5 deletions src/engine/shared/protocol7.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ enum
NETMSG_RCON_CMD_ADD,
NETMSG_RCON_CMD_REM,

NETMSG_AUTH_CHALLANGE, //
NETMSG_AUTH_RESULT, //
NETMSG_UNUSED1,
NETMSG_UNUSED2,

// sent by client
NETMSG_READY, //
Expand All @@ -40,13 +40,13 @@ enum
NETMSG_RCON_AUTH, //
NETMSG_REQUEST_MAP_DATA, //

NETMSG_AUTH_START, //
NETMSG_AUTH_RESPONSE, //
NETMSG_UNUSED3,
NETMSG_UNUSED4,

// sent by both
NETMSG_PING,
NETMSG_PING_REPLY,
NETMSG_ERROR,
NETMSG_UNUSED5,

NETMSG_MAPLIST_ENTRY_ADD, // todo 0.8: move up
NETMSG_MAPLIST_ENTRY_REM,
Expand Down

0 comments on commit 5578981

Please sign in to comment.