Skip to content

Commit

Permalink
engine: client: fix lightstyle timings on GoldSrc protocol, share the…
Browse files Browse the repository at this point in the history
… parser with Quake protocol handler
  • Loading branch information
a1batross committed Dec 27, 2024
1 parent 88949a9 commit 5d6cf48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions engine/client/cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,11 +1325,11 @@ void CL_ParseLightStyle( sizebuf_t *msg, connprotocol_t proto )
{
int style;
const char *s;
float f = 0.0f;
float f = cl.mtime[0];

style = MSG_ReadByte( msg );
s = MSG_ReadString( msg );
if( proto != PROTO_GOLDSRC )
if( proto != PROTO_GOLDSRC && proto != PROTO_QUAKE )
f = MSG_ReadFloat( msg );

CL_SetLightstyle( style, s, f );
Expand Down
4 changes: 1 addition & 3 deletions engine/client/cl_qparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,7 @@ void CL_ParseQuakeMessage( sizebuf_t *msg )
CL_ParseQuakeServerInfo( msg );
break;
case svc_lightstyle:
param1 = MSG_ReadByte( msg );
str = MSG_ReadString( msg );
CL_SetLightstyle( param1, str, cl.mtime[0] );
CL_ParseLightStyle( msg, PROTO_QUAKE );
break;
case svc_updatename:
param1 = MSG_ReadByte( msg );
Expand Down

0 comments on commit 5d6cf48

Please sign in to comment.