diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 0932b7ec..eef1d28d 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -264,7 +264,7 @@ CL_ParseParticles ================== */ -void CL_ParseParticles( sizebuf_t *msg ) +void CL_ParseParticles( sizebuf_t *msg, connprotocol_t proto ) { vec3_t org, dir; int i, count, color; @@ -277,8 +277,12 @@ void CL_ParseParticles( sizebuf_t *msg ) count = MSG_ReadByte( msg ); color = MSG_ReadByte( msg ); - if( count == 255 ) count = 1024; - life = MSG_ReadByte( msg ) * 0.125f; + if( count == 255 ) + count = 1024; + + if( proto == PROTO_GOLDSRC ) + life = 0.0f; + else life = MSG_ReadByte( msg ) * 0.125f; if( life != 0.0f && count == 1 ) { @@ -2585,7 +2589,7 @@ void CL_ParseServerMessage( sizebuf_t *msg ) CL_UpdateUserPings( msg ); break; case svc_particle: - CL_ParseParticles( msg ); + CL_ParseParticles( msg, PROTO_CURRENT ); break; case svc_restoresound: CL_ParseRestoreSoundPacket( msg ); diff --git a/engine/client/cl_parse_48.c b/engine/client/cl_parse_48.c index 95b34508..fd4f5de5 100644 --- a/engine/client/cl_parse_48.c +++ b/engine/client/cl_parse_48.c @@ -466,7 +466,7 @@ void CL_ParseLegacyServerMessage( sizebuf_t *msg ) CL_UpdateUserPings( msg ); break; case svc_particle: - CL_ParseParticles( msg ); + CL_ParseParticles( msg, PROTO_LEGACY ); break; case svc_restoresound: Con_Printf( S_ERROR "%s: svc_restoresound: implement me!\n", __func__ ); diff --git a/engine/client/cl_parse_gs.c b/engine/client/cl_parse_gs.c index 9730af3a..7b7d4601 100644 --- a/engine/client/cl_parse_gs.c +++ b/engine/client/cl_parse_gs.c @@ -636,7 +636,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) MSG_EndBitWriting( msg ); break; case svc_particle: - CL_ParseParticles( msg ); + CL_ParseParticles( msg, PROTO_GOLDSRC ); break; case svc_spawnstatic: // no-op diff --git a/engine/client/client.h b/engine/client/client.h index 4e97c6e6..cda42d96 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -868,7 +868,7 @@ void CL_UpdateUserinfo( sizebuf_t *msg, connprotocol_t proto ); void CL_ParseResource( sizebuf_t *msg ); void CL_ParseClientData( sizebuf_t *msg, connprotocol_t proto ); void CL_UpdateUserPings( sizebuf_t *msg ); -void CL_ParseParticles( sizebuf_t *msg ); +void CL_ParseParticles( sizebuf_t *msg, connprotocol_t proto ); void CL_ParseRestoreSoundPacket( sizebuf_t *msg ); void CL_ParseBaseline( sizebuf_t *msg, connprotocol_t proto ); void CL_ParseSignon( sizebuf_t *msg, connprotocol_t proto );