Validates set_sdfgi_cascades argument range

This commit is contained in:
Haoyu Qiu 2021-08-02 23:50:59 +08:00
parent 2db45b62c0
commit b6638cb80d

View file

@ -449,6 +449,7 @@ bool Environment::is_sdfgi_enabled() const {
}
void Environment::set_sdfgi_cascades(SDFGICascades p_cascades) {
ERR_FAIL_INDEX(p_cascades, SDFGI_CASCADES_8 + 1);
sdfgi_cascades = p_cascades;
_update_sdfgi();
}