Source/ThunderBeast/QuakeToonProto1/client/cl_tent.c
int CL_ParsePlayerBeam (struct model_s *model)
{
	int		ent;
	vec3_t	start, end, offset;
	beam_t	*b;
	int		i;
	
	ent = MSG_ReadShort (&net_message);
	
	MSG_ReadPos (&net_message, start);
	MSG_ReadPos (&net_message, end);
	// PMM - network optimization
	if (model == cl_mod_heatbeam)
		VectorSet(offset, 2, 7, -3);
	else if (model == cl_mod_monster_heatbeam)
	{
		model = cl_mod_heatbeam;
		VectorSet(offset, 0, 0, 0);
	}
	else
		MSG_ReadPos (&net_message, offset);

//	Com_Printf ("end- %f %f %f\n", end[0], end[1], end[2]);

// override any beam with the same entity
// PMM - For player beams, we only want one per player (entity) so..
	for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
	{
		if (b->entity == ent)
		{
			b->entity = ent;
			b->model = model;
			b->endtime = cl.time + 200;
			VectorCopy (start, b->start);
			VectorCopy (end, b->end);
			VectorCopy (offset, b->offset);
			return ent;
		}
	}

// find a free beam
	for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
	{
		if (!b->model || b->endtime < cl.time)
		{
			b->entity = ent;
			b->model = model;
			b->endtime = cl.time + 100;		// PMM - this needs to be 100 to prevent multiple heatbeams
			VectorCopy (start, b->start);
			VectorCopy (end, b->end);
			VectorCopy (offset, b->offset);
			return ent;
		}
	}
	Com_Printf ("beam list overflow!\n");	
	return ent;
}
// ROGUE
/*
=================
CL_ParsePlayerBeam
  - adds to the cl_playerbeam array instead of the cl_beams array
=================
*/
ROGUE
CL_ParsePlayerBeam
adds to the cl_playerbeam array instead of the cl_beams array
ROGUE CL_ParsePlayerBeam adds to the cl_playerbeam array instead of the cl_beams array
int CL_ParsePlayerBeam (struct model_s *model)
{
	int		ent;
	vec3_t	start, end, offset;
	beam_t	*b;
	int		i;
	ent = MSG_ReadShort (&net_message);
	MSG_ReadPos (&net_message, start);
	MSG_ReadPos (&net_message, end);
	if (model == cl_mod_heatbeam)
		VectorSet(offset, 2, 7, -3);
	else if (model == cl_mod_monster_heatbeam)
	{
		model = cl_mod_heatbeam;
		VectorSet(offset, 0, 0, 0);
	}
	else
		MSG_ReadPos (&net_message, offset);
	for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
	{
		if (b->entity == ent)
		{
			b->entity = ent;
			b->model = model;
			b->endtime = cl.time + 200;
			VectorCopy (start, b->start);
			VectorCopy (end, b->end);
			VectorCopy (offset, b->offset);
			return ent;
		}
	}
	for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++)
	{
		if (!b->model || b->endtime < cl.time)
		{
			b->entity = ent;
			b->model = model;
			b->endtime = cl.time + 100;		
			VectorCopy (start, b->start);
			VectorCopy (end, b->end);
			VectorCopy (offset, b->offset);
			return ent;
		}
	}
	Com_Printf ("beam list overflow!\n");	
	return ent;
}
int CL_ParsePlayerBeam ( struct model_s * model ) { int ent ; vec3_t start , end , offset ; beam_t * b ; int i ; ent = MSG_ReadShort ( & net_message ) ; MSG_ReadPos ( & net_message , start ) ; MSG_ReadPos ( & net_message , end ) ; if ( model == cl_mod_heatbeam ) VectorSet ( offset , 2 , 7 , -3 ) ; else if ( model == cl_mod_monster_heatbeam ) { model = cl_mod_heatbeam ; VectorSet ( offset , 0 , 0 , 0 ) ; } else MSG_ReadPos ( & net_message , offset ) ; for ( i = 0 , b = cl_playerbeams ; i < MAX_BEAMS ; i ++ , b ++ ) { if ( b -> entity == ent ) { b -> entity = ent ; b -> model = model ; b -> endtime = cl . time + 200 ; VectorCopy ( start , b -> start ) ; VectorCopy ( end , b -> end ) ; VectorCopy ( offset , b -> offset ) ; return ent ; } } for ( i = 0 , b = cl_playerbeams ; i < MAX_BEAMS ; i ++ , b ++ ) { if ( ! b -> model || b -> endtime < cl . time ) { b -> entity = ent ; b -> model = model ; b -> endtime = cl . time + 100 ; VectorCopy ( start , b -> start ) ; VectorCopy ( end , b -> end ) ; VectorCopy ( offset , b -> offset ) ; return ent ; } } Com_Printf ( " \n " ) ; return ent ; }
ROGUE
CL_ParsePlayerBeam
 adds to the cl_playerbeam array instead of the cl_beams array
ROGUE CL_ParsePlayerBeam adds to the cl_playerbeam array instead of the cl_beams array
// PMM - network optimization //	Com_Printf ("end- %f %f %f\n", end[0], end[1], end[2]); // override any beam with the same entity // PMM - For player beams, we only want one per player (entity) so.. // find a free beam // PMM - this needs to be 100 to prevent multiple heatbeams