mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-19 15:42:28 +00:00
adjust_linked now checks if parameters are there
This commit is contained in:
@@ -35,6 +35,12 @@ EX void adjust_linked() {
|
||||
indenter ind(2);
|
||||
geom3::invalid = "";
|
||||
dynamicval<bool> d(linked_consequence, true);
|
||||
|
||||
if(!find_edit(&pconf.alpha) || !find_edit(&vid.depth) || !find_edit(&vid.camera)) {
|
||||
printf("error: cannot adjust_linked as edits are missing\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if(vid.tc_alpha < vid.tc_depth && vid.tc_alpha < vid.tc_camera) {
|
||||
find_edit(&pconf.alpha)->set_cld(tan_auto(vid.depth) / tan_auto(vid.camera));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user