mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2025-02-24 18:01:33 +00:00
client: send 16-bit angles when server is fitzquake
This should now be all that is needed on the client side for FitzQuake protocol (666) support. Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
1c842c0bac
commit
ef14eecafe
@ -527,7 +527,10 @@ CL_SendMove(usercmd_t *cmd)
|
||||
MSG_WriteFloat(&buf, cl.mtime[0]); /* so server can get ping times */
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
MSG_WriteAngle(&buf, cl.viewangles[i]);
|
||||
if (cl.protocol == PROTOCOL_VERSION_FITZ)
|
||||
MSG_WriteAngle16(&buf, cl.viewangles[i]);
|
||||
else
|
||||
MSG_WriteAngle(&buf, cl.viewangles[i]);
|
||||
|
||||
MSG_WriteShort(&buf, cmd->forwardmove);
|
||||
MSG_WriteShort(&buf, cmd->sidemove);
|
||||
|
@ -520,16 +520,16 @@ MSG_WriteCoord(sizebuf_t *sb, float f)
|
||||
void
|
||||
MSG_WriteAngle(sizebuf_t *sb, float f)
|
||||
{
|
||||
MSG_WriteByte(sb, (int)(f * 256 / 360) & 255);
|
||||
MSG_WriteByte(sb, (int)floorf((f * 256 / 360) + 0.5f) & 255);
|
||||
}
|
||||
|
||||
#ifdef QW_HACK
|
||||
void
|
||||
MSG_WriteAngle16(sizebuf_t *sb, float f)
|
||||
{
|
||||
MSG_WriteShort(sb, (int)(f * 65536 / 360) & 65535);
|
||||
MSG_WriteShort(sb, (int)floorf((f * 65536 / 360) + 0.5f) & 65535);
|
||||
}
|
||||
|
||||
#ifdef QW_HACK
|
||||
void
|
||||
MSG_WriteDeltaUsercmd(sizebuf_t *buf, const usercmd_t *from,
|
||||
const usercmd_t *cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user