31 |
|
rcont.rno = nrays; |
32 |
|
rcont.ro = NULL; |
33 |
|
rcont.rot = FHUGE; |
34 |
– |
rcont.rno = nrays; |
34 |
|
multp3(rcont.rorg, r->rorg, in->b.xfm); |
35 |
|
multv3(rcont.rdir, r->rdir, in->b.xfm); |
36 |
|
for (i = 0; i < 3; i++) |
40 |
|
return(0); /* missed */ |
41 |
|
if (rcont.rot * in->f.sca >= r->rot) |
42 |
|
return(0); /* not close enough */ |
43 |
< |
/* if we have modifier, use it */ |
44 |
< |
if (o->omod != OVOID) |
43 |
> |
|
44 |
> |
if (o->omod != OVOID) { /* if we have modifier, use it */ |
45 |
|
r->ro = o; |
46 |
< |
else { /* else use theirs */ |
46 |
> |
r->rofs = 1.0; setident4(r->rofx); |
47 |
> |
r->robs = 1.0; setident4(r->robx); |
48 |
> |
} else { /* else use theirs */ |
49 |
|
r->ro = rcont.ro; |
50 |
|
multmat4(r->rofx, rcont.rofx, in->f.xfm); |
51 |
|
r->rofs = rcont.rofs * in->f.sca; |