remove unused code

This commit is contained in:
in0finite 2021-05-02 23:51:37 +02:00
parent 2fc4d58bb6
commit 2da430251c
2 changed files with 1 additions and 19 deletions

View file

@ -158,22 +158,11 @@ namespace SanAndreasUnity.Behaviours.World
Profiler.BeginSample ("Add mesh", this);
var nightColors = geoms.Geometry[0].RwGeometry.ExtraVertColor;
bool hasNightColors = nightColors != null && nightColors.Colors != null;
var mf = gameObject.AddComponent<MeshFilter>();
var mr = gameObject.AddComponent<MeshRenderer>();
mf.sharedMesh = geoms.Geometry[0].Mesh;
mr.sharedMaterials = geoms.Geometry[0].GetMaterials(
Instance.Object.Flags,
hasNightColors,
mat =>
{
mat.SetTexture(NoiseTexId, NoiseTex);
// if (hasNightColors)
// mat.SetColorArray(Geometry.NightColorsPropertyId, nightColors.Colors);
});
mr.sharedMaterials = geoms.Geometry[0].GetMaterials(Instance.Object.Flags, mat => mat.SetTexture(NoiseTexId, NoiseTex));
Profiler.EndSample ();

View file

@ -19,7 +19,6 @@ namespace SanAndreasUnity.Importing.Conversion
Alpha = 2,
Vehicle = 4,
OverrideAlpha = 8,
NightColors = 16,
}
public class Geometry
@ -656,7 +655,6 @@ namespace SanAndreasUnity.Importing.Conversion
public UnityEngine.Material[] GetMaterials(
ObjectFlag flags,
bool hasNightColors,
Action<UnityEngine.Material> setupMaterial)
{
var matFlags = MaterialFlags.Default | MaterialFlags.OverrideAlpha;
@ -672,11 +670,6 @@ namespace SanAndreasUnity.Importing.Conversion
matFlags |= MaterialFlags.Alpha;
}
if (hasNightColors)
{
matFlags |= MaterialFlags.NightColors;
}
return GetMaterials(matFlags, setupMaterial);
}