Skip to content

Commit

Permalink
Fix #572 height brush not adding regions
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Dec 11, 2024
1 parent c2cf6be commit d606879
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/docs/games.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/terrain_3d_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Ref<Terrain3DRegion> 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()) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d606879

Please sign in to comment.