added missing CAP_RAY guard

This commit is contained in:
Zeno Rogue 2020-07-25 12:00:01 +02:00
parent adc17dce1b
commit 7e5ff7b318
1 changed files with 16 additions and 2 deletions

View File

@ -1579,8 +1579,22 @@ struct flat_model_enabler {
projection_configuration bak;
ld sf;
bool ru;
flat_model_enabler() { bak = pconf; sf = stretch::factor; stretch::factor = 0; ru = ray::in_use; ray::in_use = false; enable_flat_model(); }
~flat_model_enabler() { pconf = bak; stretch::factor = sf; ray::in_use = ru; calcparam(); }
flat_model_enabler() {
bak = pconf;
sf = stretch::factor; stretch::factor = 0;
#if CAP_RAY
ru = ray::in_use; ray::in_use = false;
#endif
enable_flat_model();
}
~flat_model_enabler() {
pconf = bak;
stretch::factor = sf;
#if CAP_RAY
ray::in_use = ru;
#endif
calcparam();
}
};
#endif