From 8a3cc3b4b00740b2918bca86cd92c28e8a2fed2d Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 26 Oct 2018 16:50:06 +0000 Subject: [PATCH] Be more generous with decal impacts spawned away from the wall that they're meant to be spawned on. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5324 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/p_script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/client/p_script.c b/engine/client/p_script.c index e592424ca..28393be55 100644 --- a/engine/client/p_script.c +++ b/engine/client/p_script.c @@ -4692,9 +4692,9 @@ static int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count, dir = bestdir; } else - { - VectorSubtract(org, dir, ctx.tangent2); - VectorAdd(org, dir, ctx.tangent1); + { //the dir arg is generally assumed to be facing away from the surface. + VectorMA(org, 16, dir, ctx.tangent2); + VectorMA(org, -16, dir, ctx.tangent1); CL_TraceLine(ctx.tangent2, ctx.tangent1, ctx.center, bestdir, &ctx.entity); } if (ctx.entity && (unsigned)ctx.entity < (unsigned)cl.maxlerpents)