@@ -223,7 +223,7 @@ s16 MapgenV6::find_stone_level(v2s16 p2d)
223
223
if (c != CONTENT_IGNORE && (c == c_stone || c == c_desert_stone))
224
224
break ;
225
225
226
- vm-> m_area . add_y (em, i, -1 );
226
+ VoxelArea:: add_y (em, i, -1 );
227
227
}
228
228
return (y >= y_nodes_min) ? y : y_nodes_min - 1 ;
229
229
}
@@ -696,7 +696,7 @@ int MapgenV6::generateGround()
696
696
vm->m_data [i] = n_air;
697
697
}
698
698
}
699
- vm-> m_area . add_y (em, i, 1 );
699
+ VoxelArea:: add_y (em, i, 1 );
700
700
}
701
701
}
702
702
@@ -759,7 +759,7 @@ void MapgenV6::addMud()
759
759
vm->m_data [i] = addnode;
760
760
mudcount++;
761
761
762
- vm-> m_area . add_y (em, i, 1 );
762
+ VoxelArea:: add_y (em, i, 1 );
763
763
}
764
764
}
765
765
}
@@ -799,7 +799,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
799
799
n->getContent () == c_gravel)
800
800
break ;
801
801
802
- vm-> m_area . add_y (em, i, -1 );
802
+ VoxelArea:: add_y (em, i, -1 );
803
803
}
804
804
805
805
// Stop if out of area
@@ -815,7 +815,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
815
815
// Don't flow it if the stuff under it is not mud
816
816
{
817
817
u32 i2 = i;
818
- vm-> m_area . add_y (em, i2, -1 );
818
+ VoxelArea:: add_y (em, i2, -1 );
819
819
// Cancel if out of area
820
820
if (!vm->m_area .contains (i2))
821
821
continue ;
@@ -826,7 +826,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
826
826
}
827
827
}
828
828
829
- v3s16 dirs4[4 ] = {
829
+ static const v3s16 dirs4[4 ] = {
830
830
v3s16 (0 , 0 , 1 ), // back
831
831
v3s16 (1 , 0 , 0 ), // right
832
832
v3s16 (0 , 0 , -1 ), // front
@@ -836,7 +836,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
836
836
// Check that upper is walkable. Cancel
837
837
// dropping if upper keeps it in place.
838
838
u32 i3 = i;
839
- vm-> m_area . add_y (em, i3, 1 );
839
+ VoxelArea:: add_y (em, i3, 1 );
840
840
MapNode *n3 = NULL ;
841
841
842
842
if (vm->m_area .contains (i3)) {
@@ -849,7 +849,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
849
849
for (const v3s16 &dirp : dirs4) {
850
850
u32 i2 = i;
851
851
// Move to side
852
- vm-> m_area . add_p (em, i2, dirp);
852
+ VoxelArea:: add_p (em, i2, dirp);
853
853
// Fail if out of area
854
854
if (!vm->m_area .contains (i2))
855
855
continue ;
@@ -858,7 +858,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
858
858
if (ndef->get (*n2).walkable )
859
859
continue ;
860
860
// Check that under side is air
861
- vm-> m_area . add_y (em, i2, -1 );
861
+ VoxelArea:: add_y (em, i2, -1 );
862
862
if (!vm->m_area .contains (i2))
863
863
continue ;
864
864
n2 = &vm->m_data [i2];
@@ -867,7 +867,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
867
867
// Loop further down until not air
868
868
bool dropped_to_unknown = false ;
869
869
do {
870
- vm-> m_area . add_y (em, i2, -1 );
870
+ VoxelArea:: add_y (em, i2, -1 );
871
871
n2 = &vm->m_data [i2];
872
872
// if out of known area
873
873
if (!vm->m_area .contains (i2) ||
@@ -877,7 +877,7 @@ void MapgenV6::flowMud(s16 &mudflow_minpos, s16 &mudflow_maxpos)
877
877
}
878
878
} while (!ndef->get (*n2).walkable );
879
879
// Loop one up so that we're in air
880
- vm-> m_area . add_y (em, i2, 1 );
880
+ VoxelArea:: add_y (em, i2, 1 );
881
881
882
882
// Move mud to new place. Outside mapchunk remove
883
883
// any decorations above removed or placed mud.
@@ -917,17 +917,17 @@ void MapgenV6::moveMud(u32 remove_index, u32 place_index,
917
917
vm->m_data [above_remove_index].getContent () != c_water_source &&
918
918
vm->m_data [above_remove_index].getContent () != CONTENT_IGNORE) {
919
919
vm->m_data [above_remove_index] = n_air;
920
- vm-> m_area . add_y (em, above_remove_index, 1 );
920
+ VoxelArea:: add_y (em, above_remove_index, 1 );
921
921
}
922
922
// Mud placed may have partially-buried a stacked decoration, search
923
923
// above and remove.
924
- vm-> m_area . add_y (em, place_index, 1 );
924
+ VoxelArea:: add_y (em, place_index, 1 );
925
925
while (vm->m_area .contains (place_index) &&
926
926
vm->m_data [place_index].getContent () != CONTENT_AIR &&
927
927
vm->m_data [place_index].getContent () != c_water_source &&
928
928
vm->m_data [place_index].getContent () != CONTENT_IGNORE) {
929
929
vm->m_data [place_index] = n_air;
930
- vm-> m_area . add_y (em, place_index, 1 );
930
+ VoxelArea:: add_y (em, place_index, 1 );
931
931
}
932
932
}
933
933
}
@@ -1001,7 +1001,7 @@ void MapgenV6::placeTreesAndJungleGrass()
1001
1001
u32 vi = vm->m_area .index (x, y, z);
1002
1002
// place on dirt_with_grass, since we know it is exposed to sunlight
1003
1003
if (vm->m_data [vi].getContent () == c_dirt_with_grass) {
1004
- vm-> m_area . add_y (em, vi, 1 );
1004
+ VoxelArea:: add_y (em, vi, 1 );
1005
1005
vm->m_data [vi] = n_junglegrass;
1006
1006
}
1007
1007
}
@@ -1071,7 +1071,7 @@ void MapgenV6::growGrass() // Add surface nodes
1071
1071
ndef->get (n).liquid_type != LIQUID_NONE ||
1072
1072
n.getContent () == c_ice)
1073
1073
break ;
1074
- vm-> m_area . add_y (em, i, -1 );
1074
+ VoxelArea:: add_y (em, i, -1 );
1075
1075
}
1076
1076
surface_y = (y >= full_node_min.Y ) ? y : full_node_min.Y ;
1077
1077
}
@@ -1085,10 +1085,10 @@ void MapgenV6::growGrass() // Add surface nodes
1085
1085
} else if (bt == BT_TUNDRA) {
1086
1086
if (c == c_dirt) {
1087
1087
vm->m_data [i] = n_snowblock;
1088
- vm-> m_area . add_y (em, i, -1 );
1088
+ VoxelArea:: add_y (em, i, -1 );
1089
1089
vm->m_data [i] = n_dirt_with_snow;
1090
1090
} else if (c == c_stone && surface_y < node_max.Y ) {
1091
- vm-> m_area . add_y (em, i, 1 );
1091
+ VoxelArea:: add_y (em, i, 1 );
1092
1092
vm->m_data [i] = n_snowblock;
1093
1093
}
1094
1094
} else if (c == c_dirt) {
0 commit comments