mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-21 11:55:43 +02: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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user