Fix unlimited project option ranges that could cause crashes.

This commit is contained in:
G-Shadow
2023-11-10 18:55:48 +03:00
parent 9d1cbab1c4
commit cbc8ae660c
5 changed files with 34 additions and 32 deletions

View File

@ -213,12 +213,12 @@ NavigationServer3D::NavigationServer3D() {
ERR_FAIL_COND(singleton != nullptr);
singleton = this;
GLOBAL_DEF_BASIC("navigation/2d/default_cell_size", 1.0);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "navigation/2d/default_cell_size", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), 1.0);
GLOBAL_DEF("navigation/2d/use_edge_connections", true);
GLOBAL_DEF_BASIC("navigation/2d/default_edge_connection_margin", 1.0);
GLOBAL_DEF_BASIC("navigation/2d/default_link_connection_radius", 4.0);
GLOBAL_DEF_BASIC("navigation/3d/default_cell_size", 0.25);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "navigation/3d/default_cell_size", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), 0.25);
GLOBAL_DEF_BASIC("navigation/3d/default_cell_height", 0.25);
GLOBAL_DEF("navigation/3d/default_up", Vector3(0, 1, 0));
GLOBAL_DEF("navigation/3d/use_edge_connections", true);