--- ray/src/rt/raytrace.c 2005/07/30 16:41:46 2.55 +++ ray/src/rt/raytrace.c 2005/09/23 19:04:53 2.57 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: raytrace.c,v 2.55 2005/07/30 16:41:46 greg Exp $"; +static const char RCSid[] = "$Id: raytrace.c,v 2.57 2005/09/23 19:04:53 greg Exp $"; #endif /* * raytrace.c - routines for tracing and shading rays. @@ -23,7 +23,7 @@ unsigned long nrays = 0; /* number of calls to local static RREAL Lambfa[5] = {PI, PI, PI, 0.0, 0.0}; OBJREC Lamb = { OVOID, MAT_PLASTIC, "Lambertian", - {0, 5, NULL, Lambfa}, NULL, + {NULL, Lambfa, 0, 5}, NULL }; /* a Lambertian surface */ OBJREC Aftplane; /* aft clipping plane object */ @@ -118,7 +118,7 @@ rayorigin( /* start new ray from old one */ r->rweight = minweight; return(0); } - return(r->rlvl <= maxdepth && r->rweight >= minweight ? 0 : -1); + return(r->rlvl <= abs(maxdepth) && r->rweight >= minweight ? 0 : -1); }