MCPcopy Create free account
hub / github.com/JACoders/OpenJK / MSG_WriteDeltaUsercmd

Function MSG_WriteDeltaUsercmd

code/qcommon/msg.cpp:468–479  ·  view source on GitHub ↗

===================== MSG_WriteDeltaUsercmd ===================== */

Source from the content-addressed store, hash-verified

466=====================
467*/
468void MSG_WriteDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to ) {
469 MSG_WriteDelta( msg, from->serverTime, to->serverTime, 32 );
470 MSG_WriteDelta( msg, from->angles[0], to->angles[0], 16 );
471 MSG_WriteDelta( msg, from->angles[1], to->angles[1], 16 );
472 MSG_WriteDelta( msg, from->angles[2], to->angles[2], 16 );
473 MSG_WriteDelta( msg, from->forwardmove, to->forwardmove, -8 );
474 MSG_WriteDelta( msg, from->rightmove, to->rightmove, -8 );
475 MSG_WriteDelta( msg, from->upmove, to->upmove, -8 );
476 MSG_WriteDelta( msg, from->buttons, to->buttons, 16 );//FIXME: We're only really using 9 bits...can this be changed to that?
477 MSG_WriteDelta( msg, from->weapon, to->weapon, 8 );
478 MSG_WriteDelta( msg, from->generic_cmd, to->generic_cmd, 8 );
479}
480
481
482/*

Callers 1

CL_WritePacketFunction · 0.85

Calls 1

MSG_WriteDeltaFunction · 0.70

Tested by

no test coverage detected