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.c125
1 files changed, 125 insertions, 0 deletions
diff --git a/source/cl_parse.c b/source/cl_parse.c
index e32543c..bb1f0e1 100644
--- a/source/cl_parse.c
+++ b/source/cl_parse.c
@@ -1010,6 +1010,131 @@ ACTION MESSAGES
=====================================================================
*/
+tent_params_t te;
+
+static void CL_ParseTEnt( void ) {
+ te.type = MSG_ReadByte();
+
+ switch( te.type ) {
+ case TE_BLOOD:
+ case TE_GUNSHOT:
+ case TE_SPARKS:
+ case TE_BULLET_SPARKS:
+ case TE_SCREEN_SPARKS:
+ case TE_SHIELD_SPARKS:
+ case TE_SHOTGUN:
+ case TE_BLASTER:
+ case TE_GREENBLOOD:
+ case TE_BLASTER2:
+ case TE_FLECHETTE:
+ case TE_HEATBEAM_SPARKS:
+ case TE_HEATBEAM_STEAM:
+ case TE_MOREBLOOD:
+ case TE_ELECTRIC_SPARKS:
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadDir( te.dir );
+ break;
+
+ case TE_SPLASH:
+ case TE_LASER_SPARKS:
+ case TE_WELDING_SPARKS:
+ case TE_TUNNEL_SPARKS:
+ te.count = MSG_ReadByte();
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadDir( te.dir );
+ te.color = MSG_ReadByte();
+ break;
+
+ case TE_BLUEHYPERBLASTER:
+ case TE_RAILTRAIL:
+ case TE_BUBBLETRAIL:
+ case TE_DEBUGTRAIL:
+ case TE_BUBBLETRAIL2:
+ case TE_BFG_LASER:
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadPos( te.pos2 );
+ break;
+
+ case TE_GRENADE_EXPLOSION:
+ case TE_GRENADE_EXPLOSION_WATER:
+ case TE_EXPLOSION2:
+ case TE_PLASMA_EXPLOSION:
+ case TE_ROCKET_EXPLOSION:
+ case TE_ROCKET_EXPLOSION_WATER:
+ case TE_EXPLOSION1:
+ case TE_EXPLOSION1_NP:
+ case TE_EXPLOSION1_BIG:
+ case TE_BFG_EXPLOSION:
+ case TE_BFG_BIGEXPLOSION:
+ case TE_BOSSTPORT:
+ case TE_PLAIN_EXPLOSION:
+ case TE_CHAINFIST_SMOKE:
+ case TE_TRACKER_EXPLOSION:
+ case TE_TELEPORT_EFFECT:
+ case TE_DBALL_GOAL:
+ case TE_WIDOWSPLASH:
+ case TE_NUKEBLAST:
+ MSG_ReadPos( te.pos1 );
+ break;
+
+ case TE_PARASITE_ATTACK:
+ case TE_MEDIC_CABLE_ATTACK:
+ case TE_HEATBEAM:
+ case TE_MONSTER_HEATBEAM:
+ te.entity1 = MSG_ReadShort();
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadPos( te.pos2 );
+ break;
+
+ case TE_GRAPPLE_CABLE:
+ te.entity1 = MSG_ReadShort();
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadPos( te.pos2 );
+ MSG_ReadPos( te.offset );
+ break;
+
+ case TE_LIGHTNING:
+ te.entity1 = MSG_ReadShort();
+ te.entity2 = MSG_ReadShort();
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadPos( te.pos2 );
+ break;
+
+ case TE_FLASHLIGHT:
+ MSG_ReadPos( te.pos1 );
+ te.entity1 = MSG_ReadShort();
+ break;
+
+ case TE_FORCEWALL:
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadPos( te.pos2 );
+ te.color = MSG_ReadByte();
+ break;
+
+ case TE_STEAM:
+ te.entity1 = MSG_ReadShort();
+ te.count = MSG_ReadByte();
+ MSG_ReadPos( te.pos1 );
+ MSG_ReadDir( te.dir );
+ te.color = MSG_ReadByte();
+ te.entity2 = MSG_ReadShort();
+ if( te.entity1 != -1 ) {
+ te.time = MSG_ReadLong();
+ }
+ break;
+
+ case TE_WIDOWBEAMOUT:
+ te.entity1 = MSG_ReadShort();
+ MSG_ReadPos( te.pos1 );
+ break;
+
+ default:
+ Com_Error( ERR_DROP, "%s: bad type", __func__ );
+ }
+
+ CL_AddTEnt();
+}
+
/*
==================
CL_ParseStartSoundPacket