mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
New damage system, add damageGroups to ToolCapabilities, bump protocol version
This commit is contained in:
parent
3640c8c051
commit
7d9329ecfe
10 changed files with 104 additions and 56 deletions
|
@ -2080,7 +2080,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
SendMovement(m_con, peer_id);
|
||||
|
||||
// Send item definitions
|
||||
SendItemDef(m_con, peer_id, m_itemdef);
|
||||
SendItemDef(m_con, peer_id, m_itemdef, client->net_proto_version);
|
||||
|
||||
// Send node definitions
|
||||
SendNodeDef(m_con, peer_id, m_nodedef, client->net_proto_version);
|
||||
|
@ -3342,7 +3342,7 @@ void Server::SendDeathscreen(con::Connection &con, u16 peer_id,
|
|||
}
|
||||
|
||||
void Server::SendItemDef(con::Connection &con, u16 peer_id,
|
||||
IItemDefManager *itemdef)
|
||||
IItemDefManager *itemdef, u16 protocol_version)
|
||||
{
|
||||
DSTACK(__FUNCTION_NAME);
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
|
@ -3354,7 +3354,7 @@ void Server::SendItemDef(con::Connection &con, u16 peer_id,
|
|||
*/
|
||||
writeU16(os, TOCLIENT_ITEMDEF);
|
||||
std::ostringstream tmp_os(std::ios::binary);
|
||||
itemdef->serialize(tmp_os);
|
||||
itemdef->serialize(tmp_os, protocol_version);
|
||||
std::ostringstream tmp_os2(std::ios::binary);
|
||||
compressZlib(tmp_os.str(), tmp_os2);
|
||||
os<<serializeLongString(tmp_os2.str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue