mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions
This commit is contained in:
parent
ceacff13a6
commit
bba4563d89
19 changed files with 237 additions and 262 deletions
|
@ -920,11 +920,11 @@ void Client::handleCommand_SpawnParticle(NetworkPacket* pkt)
|
|||
std::string datastring(pkt->getString(0), pkt->getSize());
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
v3f pos = readV3F1000(is);
|
||||
v3f vel = readV3F1000(is);
|
||||
v3f acc = readV3F1000(is);
|
||||
float expirationtime = readF1000(is);
|
||||
float size = readF1000(is);
|
||||
v3f pos = readV3F32(is);
|
||||
v3f vel = readV3F32(is);
|
||||
v3f acc = readV3F32(is);
|
||||
float expirationtime = readF32(is);
|
||||
float size = readF32(is);
|
||||
bool collisiondetection = readU8(is);
|
||||
std::string texture = deSerializeLongString(is);
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ NetworkPacket& NetworkPacket::operator<<(float src)
|
|||
{
|
||||
checkDataSize(4);
|
||||
|
||||
writeF1000(&m_data[m_read_offset], src);
|
||||
writeF32(&m_data[m_read_offset], src);
|
||||
|
||||
m_read_offset += 4;
|
||||
return *this;
|
||||
|
@ -383,7 +383,7 @@ NetworkPacket& NetworkPacket::operator>>(float& dst)
|
|||
{
|
||||
checkReadOffset(m_read_offset, 4);
|
||||
|
||||
dst = readF1000(&m_data[m_read_offset]);
|
||||
dst = readF32(&m_data[m_read_offset]);
|
||||
|
||||
m_read_offset += 4;
|
||||
return *this;
|
||||
|
@ -393,7 +393,7 @@ NetworkPacket& NetworkPacket::operator>>(v2f& dst)
|
|||
{
|
||||
checkReadOffset(m_read_offset, 8);
|
||||
|
||||
dst = readV2F1000(&m_data[m_read_offset]);
|
||||
dst = readV2F32(&m_data[m_read_offset]);
|
||||
|
||||
m_read_offset += 8;
|
||||
return *this;
|
||||
|
@ -403,7 +403,7 @@ NetworkPacket& NetworkPacket::operator>>(v3f& dst)
|
|||
{
|
||||
checkReadOffset(m_read_offset, 12);
|
||||
|
||||
dst = readV3F1000(&m_data[m_read_offset]);
|
||||
dst = readV3F32(&m_data[m_read_offset]);
|
||||
|
||||
m_read_offset += 12;
|
||||
return *this;
|
||||
|
|
|
@ -192,6 +192,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
Redo detached inventory sending
|
||||
Add TOCLIENT_NODEMETA_CHANGED
|
||||
New network float format
|
||||
ContentFeatures version 13
|
||||
*/
|
||||
|
||||
#define LATEST_PROTOCOL_VERSION 37
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue