mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- d_protocol: Change horz/avel pack/unpacking from long to float.
This commit is contained in:
parent
79cd5e4731
commit
9c993b9104
1 changed files with 4 additions and 4 deletions
|
@ -160,9 +160,9 @@ int UnpackUserCmd (InputPacket *ucmd, const InputPacket *basis, uint8_t **stream
|
||||||
if (flags & UCMDF_BUTTONS)
|
if (flags & UCMDF_BUTTONS)
|
||||||
ucmd->actions = ESyncBits::FromInt(ReadLong(stream));
|
ucmd->actions = ESyncBits::FromInt(ReadLong(stream));
|
||||||
if (flags & UCMDF_PITCH)
|
if (flags & UCMDF_PITCH)
|
||||||
ucmd->horz = ReadLong(stream);
|
ucmd->horz = ReadFloat(stream);
|
||||||
if (flags & UCMDF_YAW)
|
if (flags & UCMDF_YAW)
|
||||||
ucmd->avel = ReadLong(stream);
|
ucmd->avel = ReadFloat(stream);
|
||||||
if (flags & UCMDF_FORWARDMOVE)
|
if (flags & UCMDF_FORWARDMOVE)
|
||||||
ucmd->fvel = ReadWord (stream);
|
ucmd->fvel = ReadWord (stream);
|
||||||
if (flags & UCMDF_SIDEMOVE)
|
if (flags & UCMDF_SIDEMOVE)
|
||||||
|
@ -196,12 +196,12 @@ int PackUserCmd (const InputPacket *ucmd, const InputPacket *basis, uint8_t **st
|
||||||
if (ucmd->horz != basis->horz)
|
if (ucmd->horz != basis->horz)
|
||||||
{
|
{
|
||||||
flags |= UCMDF_PITCH;
|
flags |= UCMDF_PITCH;
|
||||||
WriteLong (ucmd->horz, stream);
|
WriteFloat (ucmd->horz, stream);
|
||||||
}
|
}
|
||||||
if (ucmd->avel != basis->avel)
|
if (ucmd->avel != basis->avel)
|
||||||
{
|
{
|
||||||
flags |= UCMDF_YAW;
|
flags |= UCMDF_YAW;
|
||||||
WriteLong (ucmd->avel, stream);
|
WriteFloat (ucmd->avel, stream);
|
||||||
}
|
}
|
||||||
if (ucmd->fvel != basis->fvel)
|
if (ucmd->fvel != basis->fvel)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue