-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cleanup in content_mapblock #5746
Conversation
NDT_LIQUID is being drawn by MapBlockMesh since a long time ago...
testing it |
@@ -1291,8 +1270,7 @@ void MapblockMeshGenerator::drawNode() | |||
else | |||
light = getInteriorLight(n, 1, nodedef); | |||
switch (f->drawtype) { | |||
case NDT_LIQUID: drawLiquidNode(false); break; | |||
case NDT_FLOWINGLIQUID: drawLiquidNode(true); break; | |||
case NDT_FLOWINGLIQUID: drawLiquidNode(); break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work if NDT_LIQUID
is not handled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NDT_LIQUID is being drawn by MapBlockMesh since a long time ago...
as it has solidness=1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah now I see why this can be removed. That's quite new land to me, thus thanks for pointing this out :)
Here is the result of this PR If it's this function (please confirm) i approve it |
@@ -559,7 +543,7 @@ void MapblockMeshGenerator::drawLiquidSides(bool flowing) | |||
} | |||
} | |||
|
|||
void MapblockMeshGenerator::drawLiquidTop(bool flowing) | |||
void MapblockMeshGenerator::drawLiquidTop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rename these functions to drawFlowingLiquid{*}
, for easier understanding?
pardon? Actually I was surprised by the fact liquids are not drawn in case NDT_LIQUID:
assert(liquid_type == LIQUID_SOURCE);
if (tsettings.opaque_water)
alpha = 255;
solidness = 1;
if (f->solidness != 0)
continue; That is, |
i would mean, if it's dead code for flowing liquids i'm fine with this |
@nerzhul Yes, I removed dead code only. |
Applied this patch and played a bit with the buckets. Works as expected. 👍 |
NDT_LIQUID
is being drawn by MapBlockMesh since a long time ago...