mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 08:57:30 +01:00
Const correctness
This commit is contained in:
parent
34286d77c7
commit
2f35b121a4
@ -617,14 +617,14 @@ void MapblockMeshGenerator::calculateCornerLevels()
|
||||
cur_liquid.corner_levels[k][i] = getCornerLevel(i, k);
|
||||
}
|
||||
|
||||
f32 MapblockMeshGenerator::getCornerLevel(int i, int k)
|
||||
f32 MapblockMeshGenerator::getCornerLevel(int i, int k) const
|
||||
{
|
||||
float sum = 0;
|
||||
int count = 0;
|
||||
int air_count = 0;
|
||||
for (int dk = 0; dk < 2; dk++)
|
||||
for (int di = 0; di < 2; di++) {
|
||||
LiquidData::NeighborData &neighbor_data = cur_liquid.neighbors[k + dk][i + di];
|
||||
const LiquidData::NeighborData &neighbor_data = cur_liquid.neighbors[k + dk][i + di];
|
||||
content_t content = neighbor_data.content;
|
||||
|
||||
// If top is liquid, draw starting from top of node
|
||||
|
@ -138,7 +138,7 @@ private:
|
||||
void prepareLiquidNodeDrawing();
|
||||
void getLiquidNeighborhood();
|
||||
void calculateCornerLevels();
|
||||
f32 getCornerLevel(int i, int k);
|
||||
f32 getCornerLevel(int i, int k) const;
|
||||
void drawLiquidSides();
|
||||
void drawLiquidTop();
|
||||
void drawLiquidBottom();
|
||||
|
Loading…
Reference in New Issue
Block a user