From 93dade439e998713bd4d8074ee124d3ef1c27d1a Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+TokisanGames@users.noreply.github.com> Date: Wed, 25 Sep 2024 01:42:28 +0700 Subject: [PATCH] Lower min brush size; Reduce bounds error to info --- src/terrain_3d_editor.cpp | 4 ++-- src/terrain_3d_util.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/terrain_3d_editor.cpp b/src/terrain_3d_editor.cpp index 7d389859..d03fd2bc 100644 --- a/src/terrain_3d_editor.cpp +++ b/src/terrain_3d_editor.cpp @@ -39,7 +39,7 @@ Ref Terrain3DEditor::_operate_region(const Vector2i &p_region_l } if (data->get_region_map_index(p_region_loc) < 0) { if (can_print) { - LOG(ERROR, "Location ", p_region_loc, " out of bounds. Max: ", + LOG(INFO, "Location ", p_region_loc, " out of bounds. Max: ", -Terrain3DData::REGION_MAP_SIZE / 2, " to ", Terrain3DData::REGION_MAP_SIZE / 2 - 1); } return Ref(); @@ -608,7 +608,7 @@ void Terrain3DEditor::set_brush_data(const Dictionary &p_data) { // Santize settings // size is redundantly clamped differently in _operate_map and instancer::add_transforms - _brush_data["size"] = CLAMP(real_t(p_data.get("size", 10.f)), 0.5f, 4096.f); // Diameter in meters + _brush_data["size"] = CLAMP(real_t(p_data.get("size", 10.f)), 0.1f, 4096.f); // Diameter in meters _brush_data["strength"] = CLAMP(real_t(p_data.get("strength", .1f)) * .01f, .01f, 1000.f); // 1-100k% (max of 1000m per click) // mouse_pressure injected in editor.gd and sanitized in _operate_map() _brush_data["height"] = CLAMP(real_t(p_data.get("height", 0.f)), -65536.f, 65536.f); // Meters diff --git a/src/terrain_3d_util.h b/src/terrain_3d_util.h index e1921d06..8fa5ac2f 100644 --- a/src/terrain_3d_util.h +++ b/src/terrain_3d_util.h @@ -188,7 +188,7 @@ inline bool gd_is_nav(const uint32_t p_pixel) { return is_nav(p_pixel); } inline bool is_auto(const uint32_t p_pixel) { return (p_pixel & 0x1) == 1; } inline bool is_auto(const float p_pixel) { return is_auto(as_uint(p_pixel)); } -inline uint32_t enc_auto(const bool p_autosh) { return p_autosh & 0x1; } +inline uint32_t enc_auto(const bool p_auto) { return p_auto & 0x1; } inline bool gd_is_auto(const uint32_t p_pixel) { return is_auto(p_pixel); } ///////////////////////////