# | Line 52 | Line 52 | findmaterial(OBJREC *o) | |
---|---|---|
52 | aobj = lastmod(objndx(o), o->oargs.sarg[0]); | |
53 | if (aobj < 0) | |
54 | objerror(o, USER, "bad reference"); | |
55 | < | ao = objptr(aobj); |
56 | < | if (ismaterial(ao->otype)) |
55 | > | /* recursive check on alias branch */ |
56 | > | if ((ao = findmaterial(objptr(aobj))) != NULL) |
57 | return(ao); | |
58 | – | if (ao->otype == MOD_ALIAS) { |
59 | – | o = ao; |
60 | – | continue; |
61 | – | } |
58 | } | |
59 | if (o->omod == OVOID) | |
60 | return(NULL); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |