improved discrete animation while affine
This commit is contained in:
parent
8b89374421
commit
033a9099d6
|
@ -2337,6 +2337,14 @@ EX bool applyAnimation(cell *c, transmatrix& V, double& footphase, int layer) {
|
||||||
}
|
}
|
||||||
a.wherenow = a.wherenow * rspintox(wnow);
|
a.wherenow = a.wherenow * rspintox(wnow);
|
||||||
a.wherenow = a.wherenow * xpush(aspd);
|
a.wherenow = a.wherenow * xpush(aspd);
|
||||||
|
if(cgflags & qAFFINE) {
|
||||||
|
transmatrix T = a.wherenow;
|
||||||
|
fixmatrix_euclid(T);
|
||||||
|
a.wherenow = inverse(T) * a.wherenow;
|
||||||
|
for(int i=0; i<MDIM; i++)
|
||||||
|
a.wherenow[i] = lerp(a.wherenow[i], Id[i], aspd / R);
|
||||||
|
a.wherenow = T * a.wherenow;
|
||||||
|
}
|
||||||
fixmatrix(a.wherenow);
|
fixmatrix(a.wherenow);
|
||||||
a.footphase += a.attacking == 2 ? -aspd : aspd;
|
a.footphase += a.attacking == 2 ? -aspd : aspd;
|
||||||
footphase = a.footphase;
|
footphase = a.footphase;
|
||||||
|
|
Loading…
Reference in New Issue