[quake3-commits] r1595 - trunk/code/renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Sep 14 19:01:50 EDT 2009
Author: icculus
Date: 2009-09-14 19:01:49 -0400 (Mon, 14 Sep 2009)
New Revision: 1595
Modified:
trunk/code/renderer/tr_scene.c
Log:
Try to catch some NaNs that are almost certainly a compiler optimization bug.
Fixes Bugzilla #2998.
Modified: trunk/code/renderer/tr_scene.c
===================================================================
--- trunk/code/renderer/tr_scene.c 2009-09-14 22:07:34 UTC (rev 1594)
+++ trunk/code/renderer/tr_scene.c 2009-09-14 23:01:49 UTC (rev 1595)
@@ -211,6 +211,14 @@
if ( r_numentities >= MAX_ENTITIES ) {
return;
}
+ if ( Q_isnan(ent->origin[0]) || Q_isnan(ent->origin[1]) || Q_isnan(ent->origin[2]) ) {
+ static qboolean first_time = qtrue;
+ if (first_time) {
+ first_time = qfalse;
+ Com_Printf(S_COLOR_YELLOW "WARNING: You might have built ioquake3 with a buggy compiler!\n");
+ }
+ return;
+ }
if ( ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE ) {
ri.Error( ERR_DROP, "RE_AddRefEntityToScene: bad reType %i", ent->reType );
}
More information about the quake3-commits
mailing list