mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix replacing of liquid source by alternative liquid source.
This commit is contained in:
parent
da71ef5289
commit
77af6d9522
2 changed files with 13 additions and 13 deletions
|
@ -15,10 +15,10 @@ minetest.register_node("testnodes:sunken_torchlike", {
|
|||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
liquidtype = "source",
|
||||
--liquid_alternative_flowing = "testnodes:rliquid_flowing_5",
|
||||
--liquid_alternative_source = "testnodes:rliquid_5",
|
||||
liquid_alternative_flowing = "testnodes:sunken_torchlike",
|
||||
liquid_alternative_source = "testnodes:sunken_torchlike",
|
||||
liquid_alternative_flowing = "testnodes:rliquid_flowing_5",
|
||||
liquid_alternative_source = "testnodes:rliquid_5",
|
||||
--liquid_alternative_flowing = "testnodes:sunken_torchlike",
|
||||
--liquid_alternative_source = "testnodes:sunken_torchlike",
|
||||
liquid_range = 0,
|
||||
|
||||
inner_node = "testnodes:torchlike",
|
||||
|
@ -38,10 +38,10 @@ minetest.register_node("testnodes:sunken_nodebox", {
|
|||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
liquidtype = "source",
|
||||
--liquid_alternative_flowing = "testnodes:rliquid_flowing_5",
|
||||
--liquid_alternative_source = "testnodes:rliquid_5",
|
||||
liquid_alternative_flowing = "testnodes:sunken_nodebox",
|
||||
liquid_alternative_source = "testnodes:sunken_nodebox",
|
||||
liquid_alternative_flowing = "testnodes:rliquid_flowing_5",
|
||||
liquid_alternative_source = "testnodes:rliquid_5",
|
||||
--liquid_alternative_flowing = "testnodes:sunken_nodebox",
|
||||
--liquid_alternative_source = "testnodes:sunken_nodebox",
|
||||
liquid_range = 0,
|
||||
|
||||
inner_node = "testnodes:nodebox_fixed",
|
||||
|
@ -61,10 +61,10 @@ minetest.register_node("testnodes:sunken_mesh", {
|
|||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
liquidtype = "source",
|
||||
--liquid_alternative_flowing = "testnodes:rliquid_flowing_5",
|
||||
--liquid_alternative_source = "testnodes:rliquid_5",
|
||||
liquid_alternative_flowing = "testnodes:sunken_nodebox",
|
||||
liquid_alternative_source = "testnodes:sunken_nodebox",
|
||||
liquid_alternative_flowing = "testnodes:rliquid_flowing_5",
|
||||
liquid_alternative_source = "testnodes:rliquid_5",
|
||||
--liquid_alternative_flowing = "testnodes:sunken_nodebox",
|
||||
--liquid_alternative_source = "testnodes:sunken_nodebox",
|
||||
liquid_range = 0,
|
||||
|
||||
inner_node = "testnodes:mesh",
|
||||
|
|
|
@ -1040,7 +1040,7 @@ void ServerMap::transformLiquids(std::map<v3s16, MapBlock*> &modified_blocks,
|
|||
// liquid_kind will be set to either the flowing alternative of the node (if it's a liquid)
|
||||
// or the flowing alternative of the first of the surrounding sources (if it's air), so
|
||||
// it's perfectly safe to use liquid_kind here to determine the new node content.
|
||||
new_node_content = m_nodedef->get(liquid_kind).liquid_alternative_source_id;
|
||||
new_node_content = (liquid_type != LIQUID_SOURCE) ? (m_nodedef->get(liquid_kind).liquid_alternative_source_id) : (n0.getContent());
|
||||
} else if (num_sources >= 1 && sources[0].t != NEIGHBOR_LOWER) {
|
||||
// liquid_kind is set properly, see above
|
||||
max_node_level = new_node_level = LIQUID_LEVEL_MAX;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue