Test not positif
This commit is contained in:
parent
443b3a319d
commit
7c7dddde5e
9 changed files with 286 additions and 32 deletions
|
|
@ -46,11 +46,11 @@ public class TerrainAtlasManager {
|
|||
foreach(var surface in portalEngine.cSurfaceDesc.surfaces) {
|
||||
if(terrain.surfaceInfo == surface.surfIndex) {
|
||||
foreach(var mat in surface.terrainMaterials) {
|
||||
tmpTer.subTerrains.Add(new(GetIndex(mat.baseMaterials.First().materialDid),
|
||||
mat.minPitch,
|
||||
mat.maxPitch,
|
||||
MathOperations.RGBAColorToVector4(mat.vertexColor.First().vertexColor),
|
||||
MathOperations.RGBAColorToVector4(mat.vertexColor.First().farVertexColor)));
|
||||
tmpTer.AddSubTerrain(new(GetIndex(mat.baseMaterials.First().materialDid),
|
||||
mat.minPitch,
|
||||
mat.maxPitch,
|
||||
MathOperations.RGBAColorToVector4(mat.vertexColor.First().vertexColor),
|
||||
MathOperations.RGBAColorToVector4(mat.vertexColor.First().farVertexColor)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ public class TerrainAtlasManager {
|
|||
}
|
||||
private int GetIndex(DataId id) {
|
||||
foreach(var mat in mapTerrain) {
|
||||
if(mat.Value == id) return mat.Key;
|
||||
if(mat.Value.id == id.id) return mat.Key;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue