318 |
|
tp->k[q].li = lo; |
319 |
|
} |
320 |
|
dropit: |
321 |
< |
if (drop) { |
322 |
< |
qtL.chr[li][0] = qtL.chr[li][1] = qtL.chr[li][2] = 0; |
323 |
< |
qtL.wd[li] = falleaves; |
324 |
< |
falleaves = li; |
325 |
< |
} |
321 |
> |
if (drop) |
322 |
> |
if (li+1 == (qtL.tl ? qtL.tl : qtL.nl)) |
323 |
> |
qtL.tl = li; /* special case */ |
324 |
> |
else { |
325 |
> |
qtL.chr[li][0] = qtL.chr[li][1] = qtL.chr[li][2] = 0; |
326 |
> |
qtL.wd[li] = falleaves; |
327 |
> |
falleaves = li; |
328 |
> |
} |
329 |
|
return(li == lo); |
330 |
|
} |
331 |
|
|
337 |
|
register int li; |
338 |
|
int mapit; |
339 |
|
/* grab a leaf */ |
340 |
< |
if (falleaves >= 0) { /* check for fallen leaves */ |
340 |
> |
if (!imm_mode && falleaves >= 0) { /* check for fallen leaves */ |
341 |
|
li = falleaves; |
342 |
|
falleaves = qtL.wd[li]; |
343 |
|
mapit = qtL.tml <= qtL.tl ? |
344 |
|
(li < qtL.tml || li >= qtL.tl) : |
345 |
|
(li < qtL.tml && li >= qtL.tl) ; |
346 |
< |
} else { /* else allocate new one */ |
346 |
> |
} else { /* else allocate new one */ |
347 |
|
li = qtL.tl++; |
348 |
< |
if (qtL.tl >= qtL.nl) /* advance to next leaf in ring */ |
348 |
> |
if (qtL.tl >= qtL.nl) /* next leaf in ring */ |
349 |
|
qtL.tl = 0; |
350 |
< |
if (qtL.tl == qtL.bl) /* need to shake some free */ |
350 |
> |
if (qtL.tl == qtL.bl) /* need to shake some free */ |
351 |
|
qtCompost(LFREEPCT); |
352 |
< |
mapit = 0; /* we'll map it later */ |
352 |
> |
mapit = 0; /* we'll map it later */ |
353 |
|
} |
354 |
|
VCOPY(qtL.wp[li], p); |
355 |
|
qtL.wd[li] = encodedir(v); |