public override void Process(uint seed) { List <PathList> roads = TerrainMeta.Path.Roads; TerrainHeightMap heightMap = TerrainMeta.HeightMap; foreach (PathList item in roads) { if (!World.Networked) { PathInterpolator path = item.Path; Vector3[] points = path.Points; for (int i = 0; i < points.Length; i++) { Vector3 vector = points[i]; vector.y = heightMap.GetHeight(vector); points[i] = vector; } item.TrimTopology(2048); path.Smoothen(8, Vector3.up); path.RecalculateTangents(); item.ResetTrims(); } heightMap.Push(); item.AdjustTerrainHeight(); heightMap.Pop(); } foreach (PathList item2 in roads.AsEnumerable().Reverse()) { item2.AdjustTerrainTexture(); item2.AdjustTerrainTopology(); } MarkRoadside(); TerrainMeta.PlacementMap.Reset(); }
public override void Process(uint seed) { List <PathList> rivers = TerrainMeta.Path.Rivers; TerrainHeightMap heightMap = TerrainMeta.HeightMap; foreach (PathList item in rivers) { if (!World.Networked) { PathInterpolator path = item.Path; item.TrimTopology(16384); path.Smoothen(8, Vector3.up); path.RecalculateTangents(); item.ResetTrims(); } heightMap.Push(); item.AdjustTerrainHeight(); heightMap.Pop(); } foreach (PathList item2 in rivers.AsEnumerable().Reverse()) { item2.AdjustTerrainTexture(); item2.AdjustTerrainTopology(); } MarkRiverside(); }