change to foglaser

This commit is contained in:
Bryce Hutchings 2002-06-23 04:36:27 +00:00
parent 53afdd02e8
commit 674ee4def0
3 changed files with 20 additions and 9 deletions

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.38 2002/06/23 04:36:27 niceass
// change to foglaser
//
// Revision 1.37 2002/06/21 21:06:56 niceass // Revision 1.37 2002/06/21 21:06:56 niceass
// laserfog stuff // laserfog stuff
// //
@ -1176,10 +1179,10 @@ static void CG_VisibleLaser( vec3_t start, vec3_t finish ) {
} }
void CG_DrawVisibleLaser( vec3_t origin, int clientNum) { void CG_DrawVisibleLaser( vec3_t origin, int clientNum, vec3_t dir) {
int num, sourceContentType, destContentType; int num, sourceContentType, destContentType;
centity_t *cent; centity_t *cent;
vec3_t destination, start, end; vec3_t start, end;
trace_t trace; trace_t trace;
if ( !cg_enableLaserFog.integer ) if ( !cg_enableLaserFog.integer )
@ -1189,18 +1192,20 @@ void CG_DrawVisibleLaser( vec3_t origin, int clientNum) {
cent = &cg_entities[cg.snap->entities[num].number]; cent = &cg_entities[cg.snap->entities[num].number];
if (cent->currentState.eType == ET_LASER && if (cent->currentState.eType == ET_LASER &&
cent->currentState.clientNum == clientNum ) { cent->currentState.clientNum == clientNum ) {
VectorCopy(cent->lerpOrigin, destination);
break; break;
} }
} }
VectorCopy(origin, start);
VectorCopy(destination, end);
// Failed to find a laser dot that the player owns. // Failed to find a laser dot that the player owns.
if (num == cg.snap->numEntities) if (num == cg.snap->numEntities)
return; return;
VectorCopy(origin, start);
VectorMA(origin, 8192 * 16, dir, end);
trap_CM_BoxTrace(&trace, start, end, NULL, NULL, 0, MASK_SHOT);
VectorCopy(trace.endpos, end);
sourceContentType = trap_CM_PointContents(start, 0); sourceContentType = trap_CM_PointContents(start, 0);
destContentType = trap_CM_PointContents(end, 0); destContentType = trap_CM_PointContents(end, 0);

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.101 2002/06/23 04:36:02 niceass
// change to foglaser
//
// Revision 1.100 2002/06/21 23:20:34 blaze // Revision 1.100 2002/06/21 23:20:34 blaze
// cg_rq3_overlaycrosshair when set to 1 will draw your non zoomed crosshair overtop of your ssg crosshair // cg_rq3_overlaycrosshair when set to 1 will draw your non zoomed crosshair overtop of your ssg crosshair
// //
@ -1914,7 +1917,7 @@ localEntity_t *CG_SmokePuff(const vec3_t p,
void CG_BubbleTrail(vec3_t start, vec3_t end, float spacing); void CG_BubbleTrail(vec3_t start, vec3_t end, float spacing);
void CG_SpawnEffect(vec3_t org); void CG_SpawnEffect(vec3_t org);
void CG_ScorePlum(int client, vec3_t org, int score); void CG_ScorePlum(int client, vec3_t org, int score);
void CG_DrawVisibleLaser( vec3_t origin, int clientNum); void CG_DrawVisibleLaser( vec3_t origin, int clientNum, vec3_t dir);
//Blaze: for explosions //Blaze: for explosions
void CG_Particle_Bleed(qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEntityNum, int duration); void CG_Particle_Bleed(qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEntityNum, int duration);

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.85 2002/06/23 04:34:54 niceass
// change to foglaser
//
// Revision 1.84 2002/06/21 04:09:44 niceass // Revision 1.84 2002/06/21 04:09:44 niceass
// fog laser // fog laser
// //
@ -1727,12 +1730,12 @@ void CG_AddPlayerWeapon(refEntity_t * parent, playerState_t * ps, centity_t * ce
cent->ejectBrassTime = 0; cent->ejectBrassTime = 0;
} }
if ( cent->currentState.number != cg.predictedPlayerState.clientNum ) { if ( cent->currentState.number != cg.predictedPlayerState.clientNum ) {
refEntity_t muzzle; refEntity_t muzzle;
memset(&muzzle, 0, sizeof(muzzle)); memset(&muzzle, 0, sizeof(muzzle));
CG_PositionEntityOnTag(&muzzle, &gun, weapon->weaponModel, "tag_flash"); CG_PositionEntityOnTag(&muzzle, &gun, weapon->weaponModel, "tag_flash");
CG_DrawVisibleLaser(muzzle.origin, cent->currentState.clientNum);
CG_DrawVisibleLaser(muzzle.origin, cent->currentState.clientNum, muzzle.axis[0]);
} }
//Elder: re-added to fix loss of muzzle flashes! //Elder: re-added to fix loss of muzzle flashes!