mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Try to catch some NaNs that are almost certainly a compiler optimization bug.
Fixes Bugzilla #2998.
This commit is contained in:
parent
b096ca1d04
commit
ce544b23e6
1 changed files with 8 additions and 0 deletions
|
@ -211,6 +211,14 @@ void RE_AddRefEntityToScene( const refEntity_t *ent ) {
|
|||
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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue