Fixing some NULL pointer problems in disappearing_sliver/winding_logging.patch

(patch for regression test logging).


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-math-fix-experiments@392 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
rambetter 2010-12-31 03:50:49 +00:00
parent 01ac3e0a46
commit 6ea1ecbf23
1 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,6 @@
Index: tools/quake3/q3map2/brush.c
===================================================================
--- tools/quake3/q3map2/brush.c (revision 388)
--- tools/quake3/q3map2/brush.c (revision 391)
+++ tools/quake3/q3map2/brush.c (working copy)
@@ -421,10 +421,16 @@
side_t *side;
@ -35,15 +35,23 @@ Index: tools/quake3/q3map2/brush.c
/* walk the list of brush sides */
for( j = 0; j < brush->numsides && w != NULL; j++ )
{
@@ -451,7 +463,12 @@
@@ -451,7 +463,20 @@
#else
ChopWindingInPlace( &w, plane->normal, plane->dist, 0 ); // CLIP_EPSILON );
#endif
-
+
+ Sys_Printf(" After clipping w/ side %i we have:\n", j);
+ for (z = 0; z < w->numpoints; z++) {
+ Sys_Printf(" (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
+ if (w)
+ {
+ for (z = 0; z < w->numpoints; z++)
+ {
+ Sys_Printf(" (%.8f %.8f %.8f)\n", w->p[z][0], w->p[z][1], w->p[z][2]);
+ }
+ }
+ else
+ {
+ Sys_Printf(" winding is NULL\n");
+ }
+
/* ydnar: fix broken windings that would generate trifans */
@ -51,7 +59,7 @@ Index: tools/quake3/q3map2/brush.c
FixWindingAccu(w);
Index: tools/quake3/q3map2/map.c
===================================================================
--- tools/quake3/q3map2/map.c (revision 388)
--- tools/quake3/q3map2/map.c (revision 391)
+++ tools/quake3/q3map2/map.c (working copy)
@@ -803,7 +803,11 @@
char shader[ MAX_QPATH ];