mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-16 16:51:08 +00:00
- InputPacket: Change fvel/svel from int16_t to int32_t to accommodate larger fvel/svel from Witchaven.
This commit is contained in:
parent
6dd2f31156
commit
6371505fb3
2 changed files with 6 additions and 6 deletions
|
@ -164,9 +164,9 @@ int UnpackUserCmd (InputPacket *ucmd, const InputPacket *basis, uint8_t **stream
|
|||
if (flags & UCMDF_YAW)
|
||||
ucmd->avel = ReadFloat(stream);
|
||||
if (flags & UCMDF_FORWARDMOVE)
|
||||
ucmd->fvel = ReadWord (stream);
|
||||
ucmd->fvel = ReadLong (stream);
|
||||
if (flags & UCMDF_SIDEMOVE)
|
||||
ucmd->svel = ReadWord (stream);
|
||||
ucmd->svel = ReadLong (stream);
|
||||
}
|
||||
|
||||
return int(*stream - start);
|
||||
|
@ -206,12 +206,12 @@ int PackUserCmd (const InputPacket *ucmd, const InputPacket *basis, uint8_t **st
|
|||
if (ucmd->fvel != basis->fvel)
|
||||
{
|
||||
flags |= UCMDF_FORWARDMOVE;
|
||||
WriteWord (ucmd->fvel, stream);
|
||||
WriteLong (ucmd->fvel, stream);
|
||||
}
|
||||
if (ucmd->svel != basis->svel)
|
||||
{
|
||||
flags |= UCMDF_SIDEMOVE;
|
||||
WriteWord (ucmd->svel, stream);
|
||||
WriteLong (ucmd->svel, stream);
|
||||
}
|
||||
|
||||
// Write the packing bits
|
||||
|
|
|
@ -74,8 +74,8 @@ enum
|
|||
|
||||
struct InputPacket
|
||||
{
|
||||
int16_t svel;
|
||||
int16_t fvel;
|
||||
int32_t svel;
|
||||
int32_t fvel;
|
||||
float avel;
|
||||
float horz;
|
||||
ESyncBits actions;
|
||||
|
|
Loading…
Reference in a new issue