Commands that modify the terrain now ignore liquids

This commit is contained in:
Starbeamrainbowlabs 2022-06-11 21:56:26 +01:00
parent 2d989acee5
commit c465d6efb0
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Note to self: See the bottom of this file for the release template text.
- Add `//metaball`, which renders 2 or more [metaballs](https://en.wikipedia.org/wiki/Metaballs) in Minetest
- Migrate from `depends.txt` to `mod.conf`
- `//sculpt`: Fix undefined `default` brush
- Commands that modify the terrain now ignore liquids
## v1.13: The transformational update (2nd January 2022)

View File

@ -23,7 +23,7 @@ local function make_heightmap(pos1, pos2, manip, area, data)
-- Scan each column top to bottom
for y = pos2.y+1, pos1.y, -1 do
local i = area:index(x, y, z)
if not (wea.is_airlike(data[i]) or wea.is_liquidlike(data[i])) then
if not (wea.is_airlike(data[i]) and not wea.is_liquidlike(data[i])) then
-- It's the first non-airlike node in this column
-- Start heightmap values from 1 (i.e. there's at least 1 node in the column)
heightmap[hi] = (y - pos1.y) + 1