--- ray/src/common/readoct.c 1991/10/28 09:47:22 1.16 +++ ray/src/common/readoct.c 1992/03/12 12:18:18 2.3 @@ -18,7 +18,6 @@ static char SCCSid[] = "$SunId$ LBL"; #include "otypes.h" -extern double atof(); static double getflt(); static long getint(); static char *getstr(); @@ -92,8 +91,8 @@ char *ofn[]; if (load & IO_TREE) { /* get the octree */ scene->cutree = gettree(); - /* get the scene */ - if (nf == 0 && load & IO_SCENE) { + if (load & IO_SCENE) /* get the scene */ + if (nf == 0) { for (i = 0; *getstr(sbuf); i++) if ((otypmap[i] = otype(sbuf)) < 0) { sprintf(errmsg, "unknown type \"%s\"", @@ -102,14 +101,14 @@ char *ofn[]; } while (getobj() != OVOID) ; - } else if (load & IO_SCENE) { /* consistency checks */ - /* check object count */ + } else { /* consistency checks */ + /* check object count */ if (nobjects != objorig+fnobjects) octerror(USER, "bad object count; octree stale?"); - /* check for non-surfaces */ + /* check for non-surfaces */ if (nonsurfinset(objorig, fnobjects)) - octerror(USER, "non-surface in set; octree stale?"); - } + octerror(USER, "modifier in tree; octree stale?"); + } } fclose(infp); return(nf);