1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-20 23:54:49 +00:00

auto-adjusted plevel

This commit is contained in:
Zeno Rogue
2019-08-18 21:16:27 +02:00
parent da87291ea4
commit ecfef817a9
5 changed files with 12 additions and 7 deletions

View File

@@ -1379,8 +1379,8 @@ EX void optimizeview() {
ld z = zlevel(tC0(View));
View = mscale(View, -z);
product::in_underlying_map(optimizeview);
if(z > product::plevel / 2) { product::current_view_level--; z -= product::plevel; }
if(z < -product::plevel / 2) { product::current_view_level++; z += product::plevel; }
if(z > cgi.plevel / 2) { product::current_view_level--; z -= cgi.plevel; }
if(z < -cgi.plevel / 2) { product::current_view_level++; z += cgi.plevel; }
View = mscale(View, z);
return;
}