mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 00:53:00 +00:00
Commands that modify the terrain now ignore liquids
This commit is contained in:
parent
2d989acee5
commit
c465d6efb0
2 changed files with 2 additions and 1 deletions
|
@ -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
|
- Add `//metaball`, which renders 2 or more [metaballs](https://en.wikipedia.org/wiki/Metaballs) in Minetest
|
||||||
- Migrate from `depends.txt` to `mod.conf`
|
- Migrate from `depends.txt` to `mod.conf`
|
||||||
- `//sculpt`: Fix undefined `default` brush
|
- `//sculpt`: Fix undefined `default` brush
|
||||||
|
- Commands that modify the terrain now ignore liquids
|
||||||
|
|
||||||
|
|
||||||
## v1.13: The transformational update (2nd January 2022)
|
## v1.13: The transformational update (2nd January 2022)
|
||||||
|
|
|
@ -23,7 +23,7 @@ local function make_heightmap(pos1, pos2, manip, area, data)
|
||||||
-- Scan each column top to bottom
|
-- Scan each column top to bottom
|
||||||
for y = pos2.y+1, pos1.y, -1 do
|
for y = pos2.y+1, pos1.y, -1 do
|
||||||
local i = area:index(x, y, z)
|
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
|
-- 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)
|
-- Start heightmap values from 1 (i.e. there's at least 1 node in the column)
|
||||||
heightmap[hi] = (y - pos1.y) + 1
|
heightmap[hi] = (y - pos1.y) + 1
|
||||||
|
|
Loading…
Reference in a new issue