Some small de-optimizations :)

Reverting this file to it's original
version fixed a bug involving particles
and lattices.
This commit is contained in:
Chris Want 2003-02-13 16:56:42 +00:00
parent bf2e5762dc
commit 8729dfb134

@ -284,7 +284,7 @@ void calc_latt_deform(float *co)
Lattice *lt; Lattice *lt;
float fu, du, u, v, w, tu[4], tv[4], tw[4]; float fu, du, u, v, w, tu[4], tv[4], tw[4];
float *fpw, *fpv, *fpu, vec[3]; float *fpw, *fpv, *fpu, vec[3];
int ui, vi, wi, uu, vv, ww, end, end2; int ui, vi, wi, uu, vv, ww;
if(latticedata==0) return; if(latticedata==0) return;
@ -333,8 +333,7 @@ void calc_latt_deform(float *co)
wi= 0; wi= 0;
} }
end = wi+2; for(ww= wi-1; ww<=wi+2; ww++) {
for(ww= wi-1; ww<=end; ww++) {
w= tw[ww-wi+1]; w= tw[ww-wi+1];
if(w!=0.0) { if(w!=0.0) {
@ -344,8 +343,7 @@ void calc_latt_deform(float *co)
} }
else fpw= latticedata; else fpw= latticedata;
end2 = vi+2; for(vv= vi-1; vv<=vi+2; vv++) {
for(vv= vi-1; vv<=end; vv++) {
v= w*tv[vv-vi+1]; v= w*tv[vv-vi+1];
if(v!=0.0) { if(v!=0.0) {
@ -376,7 +374,6 @@ void calc_latt_deform(float *co)
} }
} }
void end_latt_deform() void end_latt_deform()
{ {