mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
Remove MSG_WriteDeltaUsercmd and MSG_ReadDeltaUsercmd
This commit is contained in:
parent
617107429d
commit
80b0792980
2 changed files with 2 additions and 56 deletions
|
@ -668,58 +668,7 @@ usercmd_t communication
|
|||
|
||||
/*
|
||||
=====================
|
||||
MSG_WriteDeltaUsercmd
|
||||
=====================
|
||||
*/
|
||||
void MSG_WriteDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to ) {
|
||||
if ( to->serverTime - from->serverTime < 256 ) {
|
||||
MSG_WriteBits( msg, 1, 1 );
|
||||
MSG_WriteBits( msg, to->serverTime - from->serverTime, 8 );
|
||||
} else {
|
||||
MSG_WriteBits( msg, 0, 1 );
|
||||
MSG_WriteBits( msg, to->serverTime, 32 );
|
||||
}
|
||||
MSG_WriteDelta( msg, from->angles[0], to->angles[0], 16 );
|
||||
MSG_WriteDelta( msg, from->angles[1], to->angles[1], 16 );
|
||||
MSG_WriteDelta( msg, from->angles[2], to->angles[2], 16 );
|
||||
MSG_WriteDelta( msg, from->forwardmove, to->forwardmove, 8 );
|
||||
MSG_WriteDelta( msg, from->rightmove, to->rightmove, 8 );
|
||||
MSG_WriteDelta( msg, from->upmove, to->upmove, 8 );
|
||||
MSG_WriteDelta( msg, from->buttons, to->buttons, 16 );
|
||||
MSG_WriteDelta( msg, from->weapon, to->weapon, 8 );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=====================
|
||||
MSG_ReadDeltaUsercmd
|
||||
=====================
|
||||
*/
|
||||
void MSG_ReadDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to ) {
|
||||
if ( MSG_ReadBits( msg, 1 ) ) {
|
||||
to->serverTime = from->serverTime + MSG_ReadBits( msg, 8 );
|
||||
} else {
|
||||
to->serverTime = MSG_ReadBits( msg, 32 );
|
||||
}
|
||||
to->angles[0] = MSG_ReadDelta( msg, from->angles[0], 16);
|
||||
to->angles[1] = MSG_ReadDelta( msg, from->angles[1], 16);
|
||||
to->angles[2] = MSG_ReadDelta( msg, from->angles[2], 16);
|
||||
to->forwardmove = MSG_ReadDelta( msg, from->forwardmove, 8);
|
||||
if( to->forwardmove == -128 )
|
||||
to->forwardmove = -127;
|
||||
to->rightmove = MSG_ReadDelta( msg, from->rightmove, 8);
|
||||
if( to->rightmove == -128 )
|
||||
to->rightmove = -127;
|
||||
to->upmove = MSG_ReadDelta( msg, from->upmove, 8);
|
||||
if( to->upmove == -128 )
|
||||
to->upmove = -127;
|
||||
to->buttons = MSG_ReadDelta( msg, from->buttons, 16);
|
||||
to->weapon = MSG_ReadDelta( msg, from->weapon, 8);
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
MSG_WriteDeltaUsercmd
|
||||
MSG_WriteDeltaUsercmdKey
|
||||
=====================
|
||||
*/
|
||||
void MSG_WriteDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *to ) {
|
||||
|
@ -757,7 +706,7 @@ void MSG_WriteDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *
|
|||
|
||||
/*
|
||||
=====================
|
||||
MSG_ReadDeltaUsercmd
|
||||
MSG_ReadDeltaUsercmdKey
|
||||
=====================
|
||||
*/
|
||||
void MSG_ReadDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *to ) {
|
||||
|
|
|
@ -95,9 +95,6 @@ float MSG_ReadAngle16 (msg_t *sb);
|
|||
void MSG_ReadData (msg_t *sb, void *buffer, int size);
|
||||
int MSG_LookaheadByte (msg_t *msg);
|
||||
|
||||
void MSG_WriteDeltaUsercmd( msg_t *msg, struct usercmd_s *from, struct usercmd_s *to );
|
||||
void MSG_ReadDeltaUsercmd( msg_t *msg, struct usercmd_s *from, struct usercmd_s *to );
|
||||
|
||||
void MSG_WriteDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *to );
|
||||
void MSG_ReadDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *to );
|
||||
|
||||
|
|
Loading…
Reference in a new issue