From 7468ff8f3dabca82522491bfdef47cf7da38016a Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 29 Mar 2005 13:52:15 +0000 Subject: [PATCH] Added te_lightningend point effect. Fixed the end-point height for truelightning. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@930 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_tent.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index 87b1438e8..2141a2767 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -351,8 +351,20 @@ void CL_ParseBeam (int tent) #endif } - R_AddDecals(end); - R_AddStain(end, -10, -10, -10, 20); + if (tent <= 2) + { + vec3_t impact, normal; + vec3_t extra; + VectorSubtract(end, start, normal); + VectorNormalize(normal); + VectorMA(end, 4, normal, extra); //extend the end-point by four + if (TraceLineN(start, extra, impact, normal)) + { + P_RunParticleEffectTypeString(impact, normal, 1, "te_lightningend"); + R_AddDecals(end); + R_AddStain(end, -10, -10, -10, 20); + } + } b = CL_NewBeam(ent, -1); if (!b) @@ -1929,6 +1941,7 @@ void CL_UpdateBeams (void) d = VectorNormalize(dist); AngleVectors (cl.simangles[0], b->end, dist, org); VectorMA(b->start, d, b->end, b->end); + b->end[2] += cl.viewheight[0]; } } else if (b->flags & STREAM_ATTACHED)