fixed a bug with radarpoints obscuring screen due to NaNs

This commit is contained in:
Zeno Rogue 2019-08-21 00:35:19 +02:00
parent 86d3e8f4b1
commit b97666980e
1 changed files with 2 additions and 1 deletions

View File

@ -2324,7 +2324,8 @@ bool applyAnimation(cell *c, transmatrix& V, double& footphase, int layer) {
ld dist = d.first / R * aspd;
if(abs(dist) > abs(d.first)) dist = -d.first;
a.wherenow = mscale(a.wherenow, dist);
aspd *= sqrt(R*R - d.first * d.first) / R;
/* signed_sqrt to prevent precision errors */
aspd *= signed_sqrt(R*R - d.first * d.first) / R;
}
a.wherenow = a.wherenow * rspintox(wnow);
a.wherenow = a.wherenow * xpush(aspd);