Created
November 2, 2012 16:00
-
-
Save celeron55/4002269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp | |
index ad819e7..ff8ef52 100644 | |
--- a/src/content_mapblock.cpp | |
+++ b/src/content_mapblock.cpp | |
@@ -492,15 +492,15 @@ void mapblock_mesh_generate_special(MeshMakeData *data, | |
// -Z towards +Z, thus the direction is +Z. | |
// Rotate texture to make animation go in flow direction | |
// Positive if liquid moves towards +Z | |
- int dz = (corner_levels[side_corners[2][0]] + | |
- corner_levels[side_corners[2][1]] < | |
- corner_levels[side_corners[3][0]] + | |
- corner_levels[side_corners[3][1]]); | |
+ int dz = (corner_levels[side_corners[3][0]] + | |
+ corner_levels[side_corners[3][1]]) - | |
+ (corner_levels[side_corners[2][0]] + | |
+ corner_levels[side_corners[2][1]]); | |
// Positive if liquid moves towards +X | |
- int dx = (corner_levels[side_corners[0][0]] + | |
- corner_levels[side_corners[0][1]] < | |
- corner_levels[side_corners[1][0]] + | |
- corner_levels[side_corners[1][1]]); | |
+ int dx = (corner_levels[side_corners[1][0]] + | |
+ corner_levels[side_corners[1][1]]) - | |
+ (corner_levels[side_corners[0][0]] + | |
+ corner_levels[side_corners[0][1]]); | |
// -X | |
if(-dx >= abs(dz)) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment