mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Cache liquid alternative IDs (#8053)
This commit is contained in:
parent
42fcfb75e8
commit
82e4137893
6 changed files with 38 additions and 16 deletions
|
@ -622,10 +622,10 @@ s8 MapNode::setLevel(const NodeDefManager *nodemgr, s16 level)
|
|||
}
|
||||
if (level >= LIQUID_LEVEL_SOURCE) {
|
||||
rest = level - LIQUID_LEVEL_SOURCE;
|
||||
setContent(nodemgr->getId(f.liquid_alternative_source));
|
||||
setContent(f.liquid_alternative_source_id);
|
||||
setParam2(0);
|
||||
} else {
|
||||
setContent(nodemgr->getId(f.liquid_alternative_flowing));
|
||||
setContent(f.liquid_alternative_flowing_id);
|
||||
setParam2((level & LIQUID_LEVEL_MASK) | (getParam2() & ~LIQUID_LEVEL_MASK));
|
||||
}
|
||||
} else if (f.param_type_2 == CPT2_LEVELED) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue