PF_traceline: change Host_Error when a NaN is detected to a Con_Warning.

This only affects the case when the developer cvar is set, we already ignore NaN's here.

negke reports getting the nan error with this debug progs.dat: http://negke.fov120.com/files/progsbjp.zip (rename to pak0.pak + install as a mod)
and his sm133_neg!ke.bsp: https://www.quaddicted.com/reviews/sm133_pack.html (walk over the zombie to activate a lightning trap)

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1255 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
ewasylishen 2015-10-06 04:08:29 +00:00
parent 31b3c37cc3
commit cf6d493154
1 changed files with 7 additions and 6 deletions

View File

@ -685,15 +685,16 @@ static void PF_traceline (void)
if (developer.value) {
if (IS_NAN(v1[0]) || IS_NAN(v1[1]) || IS_NAN(v1[2]) ||
IS_NAN(v2[0]) || IS_NAN(v2[1]) || IS_NAN(v2[2])) {
Host_Error("NAN in traceline:\nv1(%f %f %f) v2(%f %f %f)\nentity %d",
Con_Warning ("NAN in traceline:\nv1(%f %f %f) v2(%f %f %f)\nentity %d\n",
v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], NUM_FOR_EDICT(ent));
}
} else {
if (IS_NAN(v1[0]) || IS_NAN(v1[1]) || IS_NAN(v1[2]))
v1[0] = v1[1] = v1[2] = 0;
if (IS_NAN(v2[0]) || IS_NAN(v2[1]) || IS_NAN(v2[2]))
v2[0] = v2[1] = v2[2] = 0;
}
if (IS_NAN(v1[0]) || IS_NAN(v1[1]) || IS_NAN(v1[2]))
v1[0] = v1[1] = v1[2] = 0;
if (IS_NAN(v2[0]) || IS_NAN(v2[1]) || IS_NAN(v2[2]))
v2[0] = v2[1] = v2[2] = 0;
trace = SV_Move (v1, vec3_origin, vec3_origin, v2, nomonsters, ent);
pr_global_struct->trace_allsolid = trace.allsolid;