--- ray/src/rt/mx_func.c 1994/01/12 16:46:44 2.3 +++ ray/src/rt/mx_func.c 2003/02/25 02:47:22 2.6 @@ -1,15 +1,12 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: mx_func.c,v 2.6 2003/02/25 02:47:22 greg Exp $"; #endif - /* * mx_func.c - routine for mixture functions. - * - * 11/2/88 */ +#include "copyright.h" + #include "ray.h" #include "func.h" @@ -33,6 +30,7 @@ mx_func(m, r) /* compute mixture function */ register OBJREC *m; RAY *r; { + OBJECT obj; register int i; double coef; OBJECT mod[2]; @@ -40,10 +38,11 @@ RAY *r; if (m->oargs.nsargs < 4) objerror(m, USER, "bad # arguments"); + obj = objndx(m); for (i = 0; i < 2; i++) if (!strcmp(m->oargs.sarg[i], VOIDID)) mod[i] = OVOID; - else if ((mod[i] = modifier(m->oargs.sarg[i])) == OVOID) { + else if ((mod[i] = lastmod(obj, m->oargs.sarg[i])) == OVOID) { sprintf(errmsg, "undefined modifier \"%s\"", m->oargs.sarg[i]); objerror(m, USER, errmsg);