Index: source/renderer/PatchRData.cpp =================================================================== --- source/renderer/PatchRData.cpp +++ source/renderer/PatchRData.cpp @@ -1344,10 +1344,10 @@ // The 4 points making a water tile. int moves[4][2] = { - {0,0}, - {water_cell_size,0}, - {0,water_cell_size}, - {water_cell_size,water_cell_size} + {0, 0}, + {water_cell_size, 0}, + {0, water_cell_size}, + {water_cell_size, water_cell_size} }; // Where to look for when checking for water for shore tiles. int check[10][2] = { @@ -1413,10 +1413,10 @@ // Check id this tile is partly over land. // If so add a square over the terrain. This is necessary to render waves that go on shore. - if (terrain->GetVertexGroundLevel(x+px, z+pz) < waterHeight - && terrain->GetVertexGroundLevel(x+px + water_cell_size, z+pz) < waterHeight - && terrain->GetVertexGroundLevel(x+px, z+pz+water_cell_size) < waterHeight - && terrain->GetVertexGroundLevel(x+px + water_cell_size, z+pz+water_cell_size) < waterHeight) + if (terrain->GetVertexGroundLevel(x+px, z+pz) < waterHeight && + terrain->GetVertexGroundLevel(x+px + water_cell_size, z+pz) < waterHeight && + terrain->GetVertexGroundLevel(x+px, z+pz+water_cell_size) < waterHeight && + terrain->GetVertexGroundLevel(x+px + water_cell_size, z+pz+water_cell_size) < waterHeight) continue; for (int i = 0; i < 4; ++i) @@ -1424,7 +1424,7 @@ if (water_shore_index_map[z+moves[i][1]][x+moves[i][0]] != 0xFFFF) continue; ssize_t xx = x + px + moves[i][0]; - ssize_t zz = x + pz + moves[i][1]; + ssize_t zz = z + pz + moves[i][1]; SWaterVertex vertex; terrain->CalcPosition(xx,zz, vertex.m_Position);