614 |
|
) |
615 |
|
{ |
616 |
|
static char combuf[1024]; |
617 |
< |
int cfm = 0; |
617 |
> |
static int cfm = 0; |
618 |
|
int uses_inline; |
619 |
|
FILE *fp; |
620 |
|
int i; |
621 |
|
/* is octree static? */ |
622 |
|
if (!vdef(MOVE)) |
623 |
|
return(vval(OCTREEF)); |
624 |
< |
/* done already */ |
624 |
> |
/* done already? */ |
625 |
|
if (n == cfm) |
626 |
|
return(combuf); |
627 |
|
/* else create object file */ |
628 |
< |
strcpy(objtmpf, "movinobj.rad"); |
629 |
< |
fp = fopen(objtmpf, "w"); |
628 |
> |
fp = fopen(mktemp(strcpy(objtmpf, TEMPLATE)), "w"); |
629 |
|
if (fp == NULL) { |
630 |
|
sprintf(errmsg, "cannot write to moving objects file '%s'", |
631 |
|
objtmpf); |
656 |
|
vdef(OCONV) ? vval(OCONV) : "", |
657 |
|
vval(OCTREEF), objtmpf); |
658 |
|
else |
659 |
< |
sprintf(combuf, "!xform -f %s | oconv -f -i '%s' -", |
660 |
< |
objtmpf, vval(OCTREEF)); |
659 |
> |
sprintf(combuf, "!xform -f %s | oconv %s -f -i '%s' -", |
660 |
> |
objtmpf, vdef(OCONV) ? vval(OCONV) : "", |
661 |
> |
vval(OCTREEF)); |
662 |
|
return(combuf); |
663 |
|
} |
664 |
|
|