diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-09-16 19:57:58 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-09-16 19:57:58 +0000 |
commit | e68f49dd90d1650880d7124ec0a909b49805a83c (patch) | |
tree | fb50637055786c87caf262f1d58b1fb8ebe6025c /source/q_msg.c | |
parent | a9eefaa6dd9de85d28626fd2f141a38a3148caed (diff) |
MVD client now makes sure mapfile exists before doing CM_LoadMap.
Fixed MVD client not being killed in case of Com_Error resulting in a crash.
Made server HTML output pass formal validation.
Fixed COM_AppendExtension.
Pack usercmd button mask into 3 bits instead of 8.
Bumped minor Q2PRO protocol version.
Diffstat (limited to 'source/q_msg.c')
-rw-r--r-- | source/q_msg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/q_msg.c b/source/q_msg.c index a395ee6..c977f25 100644 --- a/source/q_msg.c +++ b/source/q_msg.c @@ -396,7 +396,8 @@ int MSG_WriteDeltaUsercmd_Enhanced( const usercmd_t *from, const usercmd_t *cmd } if( bits & CM_BUTTONS ) { - MSG_WriteBits( cmd->buttons, 8 ); + int buttons = ( cmd->buttons & 3 ) | ( cmd->buttons >> 5 ); + MSG_WriteBits( buttons, 3 ); } if( bits & CM_IMPULSE ) { MSG_WriteBits( cmd->msec, 8 ); @@ -1721,7 +1722,8 @@ void MSG_ReadDeltaUsercmd_Enhanced( const usercmd_t *from, usercmd_t *to ) { // read buttons if( bits & CM_BUTTONS ) { - to->buttons = MSG_ReadBits( 8 ); + int buttons = MSG_ReadBits( 3 ); + to->buttons = ( buttons & 3 ) | ( ( buttons & 4 ) << 5 ); } // read time to run command |