Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mgv5: Optimise tunnels, add biome material in entrances #3974

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@paramat
Copy link
Member

commented Apr 9, 2016

Place biome top node on tunnel entrance floor
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps
///////////////////////////////////////

Combination of #3558 and #3959 but for mgv5.
The implementation of 3D noise tunnels is now identical to the other mapgens.
Tested.

@paramat paramat added this to the 0.4.14 milestone Apr 9, 2016

@kwolekr

View changes

src/mapgen_v5.cpp Outdated
// In tunnel and ground content, excavate
vm->m_data[vi] = MapNode(CONTENT_AIR);
is_tunnel = true;
} else if (is_tunnel && column_is_open &&

This comment has been minimized.

Copy link
@kwolekr

kwolekr Apr 11, 2016

Contributor

You could optimize these following couple lines by changing it to:

} else {
    if (is_tunnel && ...)
        vm->m_data[vi] = MapNode(biome->c_top); 

    column_is_open = false;
    is_tunnel = false;
}

This comment has been minimized.

Copy link
@paramat

paramat Apr 11, 2016

Author Member

Oh yeah, i'll put this right in the other mapgens too.

@kwolekr

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2016

Looks good overall. 👍

@paramat paramat force-pushed the paramat:mgv5tunnels branch Apr 12, 2016

Mgv5: Optimise tunnels, add biome material in entrances
Place biome top node on tunnel entrance floor
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps

@paramat paramat force-pushed the paramat:mgv5tunnels branch to 414c611 Apr 12, 2016

@paramat paramat removed the WIP label Apr 12, 2016

@paramat

This comment has been minimized.

Copy link
Member Author

commented Apr 12, 2016

Updated with optimisation mentioned in line comment.
Tested.

@paramat

This comment has been minimized.

Copy link
Member Author

commented Apr 12, 2016

@paramat paramat closed this Apr 12, 2016

@paramat paramat deleted the paramat:mgv5tunnels branch Apr 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.