mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Leveled nodebox: Change levels from 1/63rds to 1/64ths
Add missing documentation of leveled nodebox to lua_api.txt, plus a little cleaning up nearby.
This commit is contained in:
parent
27144b4716
commit
d8f20d029a
3 changed files with 33 additions and 22 deletions
|
@ -250,9 +250,8 @@ void transformNodeBox(const MapNode &n, const NodeBox &nodebox,
|
|||
u8 axisdir = facedir>>2;
|
||||
facedir&=0x03;
|
||||
for (aabb3f box : fixed) {
|
||||
if (nodebox.type == NODEBOX_LEVELED) {
|
||||
box.MaxEdge.Y = -BS/2 + BS*((float)1/LEVELED_MAX) * n.getLevel(nodemgr);
|
||||
}
|
||||
if (nodebox.type == NODEBOX_LEVELED)
|
||||
box.MaxEdge.Y = (-0.5f + n.getLevel(nodemgr) / 64.0f) * BS;
|
||||
|
||||
switch (axisdir) {
|
||||
case 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue