diff --git a/Assets/Scripts/Behaviours/World/Water.cs b/Assets/Scripts/Behaviours/World/Water.cs index 053833a3..2c629a71 100644 --- a/Assets/Scripts/Behaviours/World/Water.cs +++ b/Assets/Scripts/Behaviours/World/Water.cs @@ -35,6 +35,7 @@ namespace SanAndreasUnity.Behaviours.World WaterFile file = new WaterFile(Importing.Archive.ArchiveManager.PathToCaseSensitivePath(Config.GetPath("water_path"))); // TODO: what to do with faces that don't have WaterFlags.Visible flag ? + // - it seems that those faces are transparent, usually used for very shallow waters var faces = file.Faces.Where(f => (f.Flags & WaterFlags.Visible) == WaterFlags.Visible); @@ -44,15 +45,10 @@ namespace SanAndreasUnity.Behaviours.World // - left side (between first 2 quads) // - right side (between first 2 quads) - const int numQuadsForInfiniteWater = 4; - var vertices = new List(1536); var normals = new List(1536); var indices = new List(2048); - int verticesIndex = 0; - int indicesIndex = 0; - foreach (WaterFace face in faces) this.ProcessFaceForRenderMesh(face, vertices, normals, indices);