From 8d5345be32ece1e2e396d2bd3499ded790cb9a8c Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Wed, 3 Mar 2010 19:39:22 +0000 Subject: Don't build client side dynamic lighting code unless software refresh is in use. Renamed USE_DYNAMIC to USE_DLIGHTS. --- source/cl_parse.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'source/cl_parse.c') diff --git a/source/cl_parse.c b/source/cl_parse.c index 5d5d856..e516631 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -1012,7 +1012,8 @@ ACTION MESSAGES ===================================================================== */ -tent_params_t te; +tent_params_t te; +mz_params_t mz; static void CL_ParseTEntParams( void ) { te.type = MSG_ReadByte(); @@ -1137,6 +1138,34 @@ static void CL_ParseTEntParams( void ) { CL_ParseTEnt(); } +static void CL_ParseMuzzleFlashParams( void ) { + int entity, weapon; + + entity = MSG_ReadShort(); + if( entity < 1 || entity >= MAX_EDICTS ) + Com_Error( ERR_DROP, "%s: bad entity", __func__ ); + + weapon = MSG_ReadByte(); + mz.silenced = weapon & MZ_SILENCED; + mz.weapon = weapon & ~MZ_SILENCED; + mz.entity = entity; + + CL_ParseMuzzleFlash(); +} + +static void CL_ParseMuzzleFlashParams2( void ) { + int entity; + + entity = MSG_ReadShort(); + if( entity < 1 || entity >= MAX_EDICTS ) + Com_Error( ERR_DROP, "%s: bad entity", __func__ ); + + mz.weapon = MSG_ReadByte(); + mz.entity = entity; + + CL_ParseMuzzleFlash2(); +} + /* ================== CL_ParseStartSoundPacket @@ -1538,11 +1567,11 @@ void CL_ParseServerMessage( void ) { break; case svc_muzzleflash: - CL_ParseMuzzleFlash(); + CL_ParseMuzzleFlashParams(); break; case svc_muzzleflash2: - CL_ParseMuzzleFlash2(); + CL_ParseMuzzleFlashParams2(); break; case svc_download: -- cgit v1.2.3