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

add a plantlike_leaves setting #2594

Closed

Conversation

HybridDog
Copy link
Contributor

for (u32 i = 0; i < 6; i++)
tiledef[i].name += std::string("^[noalpha");
if (plantlike_leaves) {
f->visual_scale = 1.1892;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why that value, and not 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 means that the height and the width of the polygon is the node height (1m).
lf the polygon's width is 1, there would be visual spaces between the nodes because the polygon is diagonal seen from above, and so the the visual space size would be 1-sqrt(1*1/2), which is ~0.2929

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then.

@est31
Copy link
Contributor

est31 commented Apr 5, 2015

see comment, otherwise 👍

f->solidness = 0;
f->backface_culling = false;
material_type = TILE_MATERIAL_WAVING_PLANTS;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, is it possible here to be f->waving == 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, l disabled it here because l think waving leaves with black look strange and you usually disable fancy leaves if you want to decrease lag.
l can enable it again if you want it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you document the change, you can leave it in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where shall l document it?

@paramat
Copy link
Contributor

paramat commented Jun 29, 2015

I feel this is too specialised, should be done by mod instead, it's easy to override a default node definition.

@HybridDog
Copy link
Contributor Author

But if it's a mod the players can't decide themselves if they want plantlike leaves.

@C1ffisme
Copy link

I too feel like this should be done by mod. Perhaps a setting in minetest.conf or in the settings menu could be used by mod-makers. Then you can use minetest.overwrite_node():

if minetest.getsettingbool(plantlike_leaves) then
    minetest.overwrite_node({
        drawtype="plantlike",
    })
end

@HybridDog
Copy link
Contributor Author

it's already done by mods, but if you want to have plantlike leaves on every server it doesn't work

@C1ffisme
Copy link

Oh yes, I suppose that's true. If this is done then the work is done server side.
Still, it seems wrong that this kind of thing overwrites drawtypes.

@kilbith
Copy link
Contributor

kilbith commented Jul 18, 2015

This PR does still matter now we have simple leaves ?

add the plantlike_leaves setting

conf.example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants