summaryrefslogtreecommitdiff
path: root/source/cl_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/cl_parse.c')
-rw-r--r--source/cl_parse.c35
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: