engine: client: fix svc_event parsing
This commit is contained in:
parent
5402a9611e
commit
6b1c283082
1 changed files with 11 additions and 11 deletions
|
@ -422,14 +422,12 @@ void CL_ParseEvent( sizebuf_t *msg, connprotocol_t proto )
|
||||||
int event_index;
|
int event_index;
|
||||||
int i, num_events;
|
int i, num_events;
|
||||||
int packet_index;
|
int packet_index;
|
||||||
event_args_t nullargs, args;
|
const event_args_t nullargs = { 0 };
|
||||||
|
event_args_t args = { 0 };
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
float delay;
|
float delay;
|
||||||
int entity_bits;
|
int entity_bits;
|
||||||
|
|
||||||
memset( &nullargs, 0, sizeof( nullargs ));
|
|
||||||
memset( &args, 0, sizeof( args ));
|
|
||||||
|
|
||||||
num_events = MSG_ReadUBitLong( msg, 5 );
|
num_events = MSG_ReadUBitLong( msg, 5 );
|
||||||
|
|
||||||
if( proto == PROTO_GOLDSRC )
|
if( proto == PROTO_GOLDSRC )
|
||||||
|
@ -444,8 +442,8 @@ void CL_ParseEvent( sizebuf_t *msg, connprotocol_t proto )
|
||||||
event_index = MSG_ReadUBitLong( msg, MAX_EVENT_BITS );
|
event_index = MSG_ReadUBitLong( msg, MAX_EVENT_BITS );
|
||||||
|
|
||||||
if( MSG_ReadOneBit( msg ))
|
if( MSG_ReadOneBit( msg ))
|
||||||
|
{
|
||||||
packet_index = MSG_ReadUBitLong( msg, entity_bits );
|
packet_index = MSG_ReadUBitLong( msg, entity_bits );
|
||||||
else packet_index = -1;
|
|
||||||
|
|
||||||
if( MSG_ReadOneBit( msg ))
|
if( MSG_ReadOneBit( msg ))
|
||||||
{
|
{
|
||||||
|
@ -453,6 +451,8 @@ void CL_ParseEvent( sizebuf_t *msg, connprotocol_t proto )
|
||||||
Delta_ReadGSFields( msg, DT_EVENT_T, &nullargs, &args, 0.0f );
|
Delta_ReadGSFields( msg, DT_EVENT_T, &nullargs, &args, 0.0f );
|
||||||
else MSG_ReadDeltaEvent( msg, &nullargs, &args );
|
else MSG_ReadDeltaEvent( msg, &nullargs, &args );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else packet_index = -1;
|
||||||
|
|
||||||
if( MSG_ReadOneBit( msg ))
|
if( MSG_ReadOneBit( msg ))
|
||||||
delay = (float)MSG_ReadWord( msg ) * (1.0f / 100.0f);
|
delay = (float)MSG_ReadWord( msg ) * (1.0f / 100.0f);
|
||||||
|
|
Loading…
Add table
Reference in a new issue