world.c: use DoublePrecisionDotProduct to fix items falling out of the world

on oms3.bsp on SSE builds.

Thanks to ParuBaru for reporting the issue.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1289 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2016-02-01 22:41:15 +00:00
parent 864044dacf
commit ebd73d2a3c
3 changed files with 4 additions and 5 deletions

View File

@ -267,8 +267,6 @@ mplane_t *lightplane;
vec3_t lightspot; vec3_t lightspot;
vec3_t lightcolor; //johnfitz -- lit support via lordhavoc vec3_t lightcolor; //johnfitz -- lit support via lordhavoc
#define DoublePrecisionDotProduct(x,y) ((double)x[0]*y[0]+(double)x[1]*y[1]+(double)x[2]*y[2])
/* /*
============= =============
RecursiveLightPoint -- johnfitz -- replaced entire function for lit support via lordhavoc RecursiveLightPoint -- johnfitz -- replaced entire function for lit support via lordhavoc

View File

@ -52,6 +52,7 @@ static inline int IS_NAN (float x) {
#define Q_rint(x) ((x) > 0 ? (int)((x) + 0.5) : (int)((x) - 0.5)) //johnfitz -- from joequake #define Q_rint(x) ((x) > 0 ? (int)((x) + 0.5) : (int)((x) - 0.5)) //johnfitz -- from joequake
#define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2]) #define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2])
#define DoublePrecisionDotProduct(x,y) ((double)x[0]*y[0]+(double)x[1]*y[1]+(double)x[2]*y[2])
#define VectorSubtract(a,b,c) {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];} #define VectorSubtract(a,b,c) {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}
#define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];} #define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
#define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];} #define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}

View File

@ -495,7 +495,7 @@ int SV_HullPointContents (hull_t *hull, int num, vec3_t p)
if (plane->type < 3) if (plane->type < 3)
d = p[plane->type] - plane->dist; d = p[plane->type] - plane->dist;
else else
d = DotProduct (plane->normal, p) - plane->dist; d = DoublePrecisionDotProduct (plane->normal, p) - plane->dist;
if (d < 0) if (d < 0)
num = node->children[1]; num = node->children[1];
else else
@ -606,8 +606,8 @@ qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec
} }
else else
{ {
t1 = DotProduct (plane->normal, p1) - plane->dist; t1 = DoublePrecisionDotProduct (plane->normal, p1) - plane->dist;
t2 = DotProduct (plane->normal, p2) - plane->dist; t2 = DoublePrecisionDotProduct (plane->normal, p2) - plane->dist;
} }
#if 1 #if 1