From 4fc641e376f19afda4c84e663cf2dc9f00b61146 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 18 Sep 2002 04:51:59 +0000 Subject: [PATCH] make lightning come from player's gun fix lightning visibility (wasn't calculating bounding box before) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2389 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_tent.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cl_tent.c b/cl_tent.c index f81fa76a..a3e1ed9b 100644 --- a/cl_tent.c +++ b/cl_tent.c @@ -486,8 +486,13 @@ void CL_RelinkBeams (void) continue; // if coming from the player, update the start position - if (b->entity == cl.viewentity) - VectorCopy (cl_entities[cl.viewentity].render.origin, b->start); + //if (b->entity == cl.viewentity) + // VectorCopy (cl_entities[cl.viewentity].render.origin, b->start); + if (b->entity) + { + VectorCopy (cl_entities[b->entity].render.origin, b->start); + b->start[2] += 16; + } // calculate pitch and yaw VectorSubtract (b->end, b->start, dist); @@ -526,6 +531,7 @@ void CL_RelinkBeams (void) ent->render.angles[0] = pitch; ent->render.angles[1] = yaw; ent->render.angles[2] = rand()%360; + CL_BoundingBoxForEntity(&ent->render); VectorMA(org, 30, dist, org); d -= 30; } -- 2.39.2