mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
implement an optimisation Griever found. hopefully doesn't cause any
problems
This commit is contained in:
parent
8651fabfbc
commit
58ce134a3c
1 changed files with 9 additions and 5 deletions
|
@ -644,7 +644,8 @@ PF_findradius (progs_t *pr)
|
|||
{
|
||||
edict_t *ent, *chain;
|
||||
float rad;
|
||||
float *eorigin, *emins, *emaxs, *org;
|
||||
//float *eorigin;
|
||||
float *emins, *emaxs, *org;
|
||||
int i, j;
|
||||
vec3_t eorg;
|
||||
|
||||
|
@ -660,11 +661,14 @@ PF_findradius (progs_t *pr)
|
|||
continue;
|
||||
if (SVfloat (ent, solid) == SOLID_NOT)
|
||||
continue;
|
||||
eorigin = SVvector (ent, origin);
|
||||
emins = SVvector (ent, mins);
|
||||
emaxs = SVvector (ent, maxs);
|
||||
//eorigin = SVvector (ent, origin);
|
||||
//emins = SVvector (ent, mins);
|
||||
//emaxs = SVvector (ent, maxs);
|
||||
emins = SVvector (ent, absmin);
|
||||
emaxs = SVvector (ent, absmax);
|
||||
for (j = 0; j < 3; j++)
|
||||
eorg[j] = org[j] - eorigin[j] - 0.5 * (emins[j] + emaxs[j]);
|
||||
eorg[j] = org[j] - 0.5 * (emins[j] + emaxs[j]);
|
||||
//eorg[j] = org[j] - eorigin[j] - 0.5 * (emins[j] + emaxs[j]);
|
||||
if (DotProduct (eorg, eorg) > rad)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue