From d606879b08b52304ebb7225f2a6b47349aeb78a5 Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+TokisanGames@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:58:15 +0700 Subject: [PATCH] Fix #572 height brush not adding regions --- doc/docs/games.md | 2 +- src/terrain_3d_editor.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/docs/games.md b/doc/docs/games.md index ae075c99..ab1fb01c 100644 --- a/doc/docs/games.md +++ b/doc/docs/games.md @@ -6,7 +6,7 @@ Terrain3D is being used in the following games. To add yours, submit it to the # | Game | Studio | Description | |------|--------|-------------| | [Out of the Ashes](https://store.steampowered.com/app/2296950/Out_of_the_Ashes/) | [Tokisan Games](https://twitter.com/TokisanGames) | Story driven medieval adventure -| [Memora Wanderer](https://twitter.com/Maytch) | Maytch | Cute nostalgic RPG +| [Memora Wanderer](https://store.steampowered.com/app/2937690/Memora_Wanderer/) | [Maytch](https://twitter.com/Maytch) | Cute nostalgic RPG | [No Gasoline](https://store.steampowered.com/app/2835350/No_Gasoline/) | [Mount Retro](https://twitter.com/mountretro) | Co-Op/Solo, Adventure-Simulation-Puzzle | [RotorSim](https://immaculate-lift-studio.itch.io/godot-flight-simulator-alpha) | [Immaculate Lift](https://www.youtube.com/channel/UC-9JixNs1FFE6T5DGwZ6O5Q) | Retro helicopter simulation | [B&E Ski](https://www.youtube.com/watch?v=pD8Ea3utz9o) | [Penguin Milk](https://bande.ski/) | Skiing game diff --git a/src/terrain_3d_editor.cpp b/src/terrain_3d_editor.cpp index f62e68fe..0134dc88 100644 --- a/src/terrain_3d_editor.cpp +++ b/src/terrain_3d_editor.cpp @@ -55,7 +55,7 @@ Ref Terrain3DEditor::_operate_region(const Vector2i &p_region_l // Create new region if location is null or deleted if (region.is_null() || (region.is_valid() && region->is_deleted())) { // And tool is Add Region, or Height + auto_regions - if ((_tool == REGION && _operation == ADD) || (_tool == SCULPT && _brush_data["auto_regions"])) { + if ((_tool == REGION && _operation == ADD) || ((_tool == SCULPT || _tool == HEIGHT) && _brush_data["auto_regions"])) { region = data->add_region_blank(p_region_loc); changed = true; if (region.is_null()) { @@ -96,7 +96,7 @@ void Terrain3DEditor::_operate_map(const Vector3 &p_global_position, const real_ // If no region and can't add one, skip whole function. Checked again later Terrain3DData *data = _terrain->get_data(); - if (!data->has_regionp(p_global_position) && (!_brush_data["auto_regions"] || _tool != SCULPT)) { + if (!data->has_regionp(p_global_position) && (!_brush_data["auto_regions"] || (_tool != SCULPT && _tool != HEIGHT))) { return; }