--- ray/src/rt/rv2.c 2005/01/21 00:52:59 2.45 +++ ray/src/rt/rv2.c 2005/04/14 04:42:33 2.46 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rv2.c,v 2.45 2005/01/21 00:52:59 greg Exp $"; +static const char RCSid[] = "$Id: rv2.c,v 2.46 2005/04/14 04:42:33 greg Exp $"; #endif /* * rv2.c - command routines used in tracing a view. @@ -14,6 +14,7 @@ static const char RCSid[] = "$Id: rv2.c,v 2.45 2005/01 #include "platform.h" #include "ray.h" +#include "source.h" #include "ambient.h" #include "otypes.h" #include "rpaint.h" @@ -725,10 +726,10 @@ char *s; if (thisray.ro == NULL) (*dev->comout)("ray hit nothing"); else { + OBJREC *mat = findmaterial(thisray.ro); sprintf(buf, "ray hit %s%s %s \"%s\"", thisray.rod < 0.0 ? "back of " : "", - thisray.ro->omod == OVOID ? VOIDID : - objptr(thisray.ro->omod)->oname, + mat==NULL ? VOIDID : mat->oname, ofun[thisray.ro->otype].funame, thisray.ro->oname); if ((ino = objptr(thisray.robj)) != thisray.ro)