summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-01-03 17:04:26 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2019-01-03 17:04:26 +0100
commitbba4563d89b6708d75a4053c69873dff0d747538 (patch)
tree8ae0c939a8b5c194f300be79e1369ad8ef4675b7 /src/network
parentceacff13a666779d75ac48f2cc5c11bc2ce5c6e1 (diff)
downloadminetest-bba4563d89b6708d75a4053c69873dff0d747538.tar.gz
minetest-bba4563d89b6708d75a4053c69873dff0d747538.tar.bz2
minetest-bba4563d89b6708d75a4053c69873dff0d747538.zip
Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp10
-rw-r--r--src/network/networkpacket.cpp8
-rw-r--r--src/network/networkprotocol.h1
3 files changed, 10 insertions, 9 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 0dca4aff4..6c0b770fa 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -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);
diff --git a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp
index 530f0fe70..35a131a34 100644
--- a/src/network/networkpacket.cpp
+++ b/src/network/networkpacket.cpp
@@ -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;
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h
index 96dfbe44f..703e96056 100644
--- a/src/network/networkprotocol.h
+++ b/src/network/networkprotocol.h
@@ -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