2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-25 11:19:59 +01:00

engine: client: remove unncesseray int <-> qboolean branch in CL_GetMessage

This commit is contained in:
Alibek Omarov 2024-11-18 10:28:21 +03:00
parent af332eb8ac
commit c4f71f1a44

View File

@ -2602,18 +2602,12 @@ CL_GetMessage
Handles recording and playback of demos, on top of NET_ code Handles recording and playback of demos, on top of NET_ code
==================== ====================
*/ */
static int CL_GetMessage( byte *data, size_t *length ) static qboolean CL_GetMessage( byte *data, size_t *length )
{ {
if( cls.demoplayback ) if( cls.demoplayback )
{ return CL_DemoReadMessage( data, length );
if( CL_DemoReadMessage( data, length ))
return true;
return false;
}
if( NET_GetPacket( NS_CLIENT, &net_from, data, length )) return NET_GetPacket( NS_CLIENT, &net_from, data, length );
return true;
return false;
} }
static void CL_ParseNetMessage( sizebuf_t *msg, void (*parsefn)( sizebuf_t * )) static void CL_ParseNetMessage( sizebuf_t *msg, void (*parsefn)( sizebuf_t * ))