@@ -839,7 +839,7 @@ static void updateFastFaceRow(
839
839
{
840
840
v3s16 p = startpos;
841
841
842
- u16 continuous_tiles_count = 0 ;
842
+ u16 continuous_tiles_count = 1 ;
843
843
844
844
bool makes_face = false ;
845
845
v3s16 p_corrected;
@@ -889,8 +889,8 @@ static void updateFastFaceRow(
889
889
&& (tile.material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)
890
890
&& (tile.material_flags & MATERIAL_FLAG_TILEABLE_VERTICAL)) {
891
891
next_is_different = false ;
892
- }
893
- else {
892
+ continuous_tiles_count++;
893
+ } else {
894
894
/* if(makes_face){
895
895
g_profiler->add("Meshgen: diff: next_makes_face != makes_face",
896
896
next_makes_face != makes_face ? 1 : 0);
@@ -915,8 +915,6 @@ static void updateFastFaceRow(
915
915
g_profiler->add("Meshgen: diff: last position", 1);*/
916
916
}
917
917
918
- continuous_tiles_count++;
919
-
920
918
if (next_is_different)
921
919
{
922
920
/*
@@ -928,8 +926,6 @@ static void updateFastFaceRow(
928
926
v3f pf (p_corrected.X , p_corrected.Y , p_corrected.Z );
929
927
// Center point of face (kind of)
930
928
v3f sp = pf - ((f32)continuous_tiles_count / 2.0 - 0.5 ) * translate_dir_f;
931
- if (continuous_tiles_count != 1 )
932
- sp += translate_dir_f;
933
929
v3f scale (1 ,1 ,1 );
934
930
935
931
if (translate_dir.X != 0 ) {
@@ -952,19 +948,18 @@ static void updateFastFaceRow(
952
948
}
953
949
}
954
950
955
- continuous_tiles_count = 0 ;
956
-
957
- makes_face = next_makes_face;
958
- p_corrected = next_p_corrected;
959
- face_dir_corrected = next_face_dir_corrected;
960
- lights[0 ] = next_lights[0 ];
961
- lights[1 ] = next_lights[1 ];
962
- lights[2 ] = next_lights[2 ];
963
- lights[3 ] = next_lights[3 ];
964
- tile = next_tile;
965
- light_source = next_light_source;
951
+ continuous_tiles_count = 1 ;
966
952
}
967
953
954
+ makes_face = next_makes_face;
955
+ p_corrected = next_p_corrected;
956
+ face_dir_corrected = next_face_dir_corrected;
957
+ lights[0 ] = next_lights[0 ];
958
+ lights[1 ] = next_lights[1 ];
959
+ lights[2 ] = next_lights[2 ];
960
+ lights[3 ] = next_lights[3 ];
961
+ tile = next_tile;
962
+ light_source = next_light_source;
968
963
p = p_next;
969
964
}
970
965
}
0 commit comments