mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 18:30:34 +00:00
fixed a bug with radarpoints obscuring screen due to NaNs
This commit is contained in:
parent
86d3e8f4b1
commit
b97666980e
@ -2324,7 +2324,8 @@ bool applyAnimation(cell *c, transmatrix& V, double& footphase, int layer) {
|
|||||||
ld dist = d.first / R * aspd;
|
ld dist = d.first / R * aspd;
|
||||||
if(abs(dist) > abs(d.first)) dist = -d.first;
|
if(abs(dist) > abs(d.first)) dist = -d.first;
|
||||||
a.wherenow = mscale(a.wherenow, dist);
|
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 * rspintox(wnow);
|
||||||
a.wherenow = a.wherenow * xpush(aspd);
|
a.wherenow = a.wherenow * xpush(aspd);
|
||||||
|
Loading…
Reference in New Issue
Block a user