mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
try to correct decal positions so small ones work a little more reliably (only when no orientation is specified).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4641 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
15caf097af
commit
45545825a4
1 changed files with 4 additions and 1 deletions
|
@ -3343,7 +3343,7 @@ static int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count,
|
|||
trace_t tr;
|
||||
float sb,sw,tb,tw;
|
||||
|
||||
vec3_t bestdir;
|
||||
vec3_t bestdir, bestorg;
|
||||
|
||||
if (!free_decals)
|
||||
return 0;
|
||||
|
@ -3354,6 +3354,7 @@ static int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count,
|
|||
bestdir[1] = 0.73;
|
||||
bestdir[2] = 0.73;
|
||||
dist = 1;
|
||||
VectorCopy(org, bestorg);
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
if (i >= 3)
|
||||
|
@ -3377,10 +3378,12 @@ static int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count,
|
|||
{
|
||||
dist = tr.fraction;
|
||||
VectorCopy(tr.plane.normal, bestdir);
|
||||
VectorCopy(tr.endpos, bestorg);
|
||||
}
|
||||
}
|
||||
}
|
||||
dir = bestdir;
|
||||
org = bestorg;
|
||||
}
|
||||
VectorInverse(dir);
|
||||
VectorNormalize(dir);
|
||||
|
|
Loading…
Reference in a new issue