From 9c993b91045455e370b81d29653c7adcc633711a Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 9 Oct 2020 16:18:28 +1100 Subject: [PATCH] - d_protocol: Change horz/avel pack/unpacking from long to float. --- source/core/d_protocol.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/core/d_protocol.cpp b/source/core/d_protocol.cpp index e2757a582..7b5972ee1 100644 --- a/source/core/d_protocol.cpp +++ b/source/core/d_protocol.cpp @@ -160,9 +160,9 @@ int UnpackUserCmd (InputPacket *ucmd, const InputPacket *basis, uint8_t **stream if (flags & UCMDF_BUTTONS) ucmd->actions = ESyncBits::FromInt(ReadLong(stream)); if (flags & UCMDF_PITCH) - ucmd->horz = ReadLong(stream); + ucmd->horz = ReadFloat(stream); if (flags & UCMDF_YAW) - ucmd->avel = ReadLong(stream); + ucmd->avel = ReadFloat(stream); if (flags & UCMDF_FORWARDMOVE) ucmd->fvel = ReadWord (stream); if (flags & UCMDF_SIDEMOVE) @@ -196,12 +196,12 @@ int PackUserCmd (const InputPacket *ucmd, const InputPacket *basis, uint8_t **st if (ucmd->horz != basis->horz) { flags |= UCMDF_PITCH; - WriteLong (ucmd->horz, stream); + WriteFloat (ucmd->horz, stream); } if (ucmd->avel != basis->avel) { flags |= UCMDF_YAW; - WriteLong (ucmd->avel, stream); + WriteFloat (ucmd->avel, stream); } if (ucmd->fvel != basis->fvel) {