mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1255 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
814c9c6c0f
commit
69791776a4
1 changed files with 7 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue