1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-11 17:32:07 +00:00

HUD elements, including the compass, now drawn correctly in all pmodels

This commit is contained in:
Zeno Rogue
2017-11-13 11:08:06 +01:00
parent 672f4d7b9e
commit 19f12e3068
9 changed files with 122 additions and 70 deletions
+6 -2
View File
@@ -775,8 +775,12 @@ int rhypot(int a, int b) { return (int) sqrt(a*a - b*b); }
ld realradius() {
ld vradius = vid.radius;
if(sphere && vid.alphax > 1) vradius /= sqrt(vid.alphax*vid.alphax - 1);
if(sphere && vid.alphax <= 1) vradius = 1e12; // use the following
if(sphere) {
if(sphereflipped())
vradius /= sqrt(vid.alphax*vid.alphax - 1);
else
vradius = 1e12; // use the following
}
vradius = min<ld>(vradius, min(vid.xres, vid.yres) / 2);
return vradius;
}