mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
intra:: reset raycaster on changes; do not try to change scalefactor automatically
This commit is contained in:
parent
af851a1d70
commit
ba009a80b2
@ -1004,6 +1004,7 @@ EX void showEuclideanMenu() {
|
||||
dialog::addSelItem(XLAT("Z-level height factor"), fts(vid.plevel_factor), 'Z');
|
||||
dialog::add_action([] {
|
||||
dialog::editNumber(vid.plevel_factor, 0, 2, 0.1, 0.7, XLAT("Z-level height factor"), "");
|
||||
dialog::reaction = ray::reset_raycaster;
|
||||
});
|
||||
}
|
||||
else if(hybri) {
|
||||
|
@ -816,11 +816,6 @@ void geometry_information::prepare_basics() {
|
||||
plevel = M_PI * single_step / psl_steps;
|
||||
}
|
||||
|
||||
if(hybri) {
|
||||
/* we do not want too short creatures, better make the scale factor smaller */
|
||||
scalefactor = min(scalefactor, cgi.plevel * 1.8 / vid.height_width);
|
||||
}
|
||||
|
||||
set_sibling_limit();
|
||||
|
||||
prepare_compute3();
|
||||
|
@ -702,6 +702,8 @@ EX void world_list() {
|
||||
addMessage(XLAT("Map loaded from %1", levelfile));
|
||||
intra::become();
|
||||
intra::start();
|
||||
mapeditor::map_version++;
|
||||
ray::reset_raycaster();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@ -814,6 +816,8 @@ EX void show_portals() {
|
||||
dialog::addSelItem(XLAT("height-to-width ratio"), fts(r), 'r');
|
||||
dialog::add_action([] {
|
||||
be_ratio_edge(mouseover2, point_direction);
|
||||
mapeditor::map_version++;
|
||||
ray::reset_raycaster();
|
||||
});
|
||||
}
|
||||
else dialog::addBreak(100);
|
||||
@ -863,7 +867,7 @@ EX ld get_edge_length(cell *c, int i) {
|
||||
|
||||
EX ld get_ratio_edge(cell *c, int i) {
|
||||
ld len = get_edge_length(c, i);
|
||||
return PIU( vid.plevel_factor * cgi.scalefactor / len );
|
||||
return vid.plevel_factor * cgi.scalefactor / len;
|
||||
}
|
||||
|
||||
EX void be_ratio_edge(cell *c, int i, ld v IS(1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user