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
This commit is contained in:
Spoike 2018-10-26 16:50:06 +00:00
parent 2bedc32ff9
commit 8a3cc3b4b0

View file

@ -4692,9 +4692,9 @@ static int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count,
dir = bestdir; dir = bestdir;
} }
else else
{ { //the dir arg is generally assumed to be facing away from the surface.
VectorSubtract(org, dir, ctx.tangent2); VectorMA(org, 16, dir, ctx.tangent2);
VectorAdd(org, dir, ctx.tangent1); VectorMA(org, -16, dir, ctx.tangent1);
CL_TraceLine(ctx.tangent2, ctx.tangent1, ctx.center, bestdir, &ctx.entity); CL_TraceLine(ctx.tangent2, ctx.tangent1, ctx.center, bestdir, &ctx.entity);
} }
if (ctx.entity && (unsigned)ctx.entity < (unsigned)cl.maxlerpents) if (ctx.entity && (unsigned)ctx.entity < (unsigned)cl.maxlerpents)