mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-29 06:35:20 +01: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:
@@ -249,18 +249,11 @@ void transformNodeBox(const MapNode &n, const NodeBox &nodebox,
|
||||
int facedir = n.getFaceDir(nodemgr);
|
||||
u8 axisdir = facedir>>2;
|
||||
facedir&=0x03;
|
||||
for(std::vector<aabb3f>::const_iterator
|
||||
i = fixed.begin();
|
||||
i != fixed.end(); ++i)
|
||||
{
|
||||
aabb3f box = *i;
|
||||
for (aabb3f box : fixed) {
|
||||
if (nodebox.type == NODEBOX_LEVELED)
|
||||
box.MaxEdge.Y = (-0.5f + n.getLevel(nodemgr) / 64.0f) * BS;
|
||||
|
||||
if (nodebox.type == NODEBOX_LEVELED) {
|
||||
box.MaxEdge.Y = -BS/2 + BS*((float)1/LEVELED_MAX) * n.getLevel(nodemgr);
|
||||
}
|
||||
|
||||
switch (axisdir)
|
||||
{
|
||||
switch (axisdir) {
|
||||
case 0:
|
||||
if(facedir == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user