mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 23:22:01 +00:00
Try to fix some cubemap issues.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5332 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e31a485e98
commit
9e98e44500
1 changed files with 3 additions and 7 deletions
|
@ -2638,19 +2638,15 @@ unsigned int Mod_NearestCubeForSurf(msurface_t *surf, denvmap_t *envmap, size_t
|
|||
VectorCopy(surf->mesh->xyz_array[0], mins);
|
||||
VectorCopy(surf->mesh->xyz_array[0], maxs);
|
||||
for (v = 1; v < surf->mesh->numvertexes; v++)
|
||||
AddPointToBounds(surf->mesh->xyz_array[0], mins, maxs);
|
||||
AddPointToBounds(surf->mesh->xyz_array[v], mins, maxs);
|
||||
VectorAvg(mins, maxs, mid);
|
||||
|
||||
for (n = 0; n < nenvmap; n++)
|
||||
{
|
||||
VectorSubtract(envmap[n].origin, mid, diff);
|
||||
#if 1
|
||||
#if 0
|
||||
//axial distance
|
||||
dist = fabs(diff[0]);
|
||||
if (dist > fabs(diff[1]))
|
||||
dist = fabs(diff[1]);
|
||||
if (dist > fabs(diff[2]))
|
||||
dist = fabs(diff[2]);
|
||||
dist = fabs(diff[0]) + fabs(diff[1]) + fabs(diff[2]);
|
||||
#else
|
||||
//radial distance (squared)
|
||||
dist = DotProduct(diff,diff);
|
||||
|
|
Loading…
Reference in a new issue