diff options
author | Andrey Nazarov <skuller@skuller.net> | 2010-03-03 19:39:22 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2010-03-03 19:39:22 +0000 |
commit | 8d5345be32ece1e2e396d2bd3499ded790cb9a8c (patch) | |
tree | 663dd8d43a5362dda8059613d980011dc2cc5b32 /source/cl_parse.c | |
parent | bcabef4d17896c4dd5b4f0b67f26cabff4b167ea (diff) |
Don't build client side dynamic lighting code unless software refresh is in use.
Renamed USE_DYNAMIC to USE_DLIGHTS.
Diffstat (limited to 'source/cl_parse.c')
-rw-r--r-- | source/cl_parse.c | 35 |
1 files changed, 32 insertions, 3 deletions
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: |