1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 09:30:35 +00:00

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

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);