mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
...
This commit is contained in:
parent
10775e2409
commit
a7c1a6a61c
1 changed files with 1 additions and 5 deletions
|
@ -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<Vector3>(1536);
|
||||
var normals = new List<Vector3>(1536);
|
||||
var indices = new List<int>(2048);
|
||||
|
||||
int verticesIndex = 0;
|
||||
int indicesIndex = 0;
|
||||
|
||||
foreach (WaterFace face in faces)
|
||||
this.ProcessFaceForRenderMesh(face, vertices, normals, indices);
|
||||
|
||||
|
|
Loading…
Reference in a new issue