mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Send initial dummy packet as empty
No functional change and no compatibility implicatons but this better matches what is documented everywhere.
This commit is contained in:
parent
eeb873b23c
commit
abf3142b26
2 changed files with 10 additions and 4 deletions
|
@ -552,6 +552,12 @@ NetworkPacket& NetworkPacket::operator<<(video::SColor src)
|
|||
|
||||
Buffer<u8> NetworkPacket::oldForgePacket()
|
||||
{
|
||||
// this is the dummy packet used to first contact the server
|
||||
if (m_command == 0) {
|
||||
assert(m_datasize == 0);
|
||||
return Buffer<u8>();
|
||||
}
|
||||
|
||||
Buffer<u8> sb(m_datasize + 2);
|
||||
writeU16(&sb[0], m_command);
|
||||
if (m_datasize > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue