mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Network proto handlers/container fixes (#6334)
* Fix HP transport + some double <-> float problems TOCLIENT_HP transport u16 hp as a u8, use u16 HP, this prevent HP over 255 to overflow across network * Fix more double/float problem in serverpackethandler & remove implicit struct type for TileAnimationParams * Fix connection unittests container
This commit is contained in:
@@ -246,7 +246,7 @@ void TestConnection::testConnectSendReceive()
|
||||
NetworkPacket pkt;
|
||||
pkt.putRawPacket((u8*) "Hello World !", 14, 0);
|
||||
|
||||
Buffer<u8> sentdata = pkt.oldForgePacket();
|
||||
SharedBuffer<u8> sentdata = pkt.oldForgePacket();
|
||||
|
||||
infostream<<"** running client.Send()"<<std::endl;
|
||||
client.Send(PEER_ID_SERVER, 0, &pkt, true);
|
||||
@@ -261,7 +261,7 @@ void TestConnection::testConnectSendReceive()
|
||||
<< ", data=" << (const char*)pkt.getU8Ptr(0)
|
||||
<< std::endl;
|
||||
|
||||
Buffer<u8> recvdata = pkt.oldForgePacket();
|
||||
SharedBuffer<u8> recvdata = pkt.oldForgePacket();
|
||||
|
||||
UASSERT(memcmp(*sentdata, *recvdata, recvdata.getSize()) == 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user