Exemplo n.º 1
0
 public static void Serialize(SerializingContainer2 sc, ref BspSurf node)
 {
     if (sc.IsLoading)
     {
         node = new BspSurf();
     }
     sc.Serialize(ref node.Material);
     sc.Serialize(ref node.PolyFlags);
     sc.Serialize(ref node.pBase);
     sc.Serialize(ref node.vNormal);
     sc.Serialize(ref node.vTextureU);
     sc.Serialize(ref node.vTextureV);
     sc.Serialize(ref node.iBrushPoly);
     sc.Serialize(ref node.Actor);
     sc.Serialize(ref node.Plane);
     sc.Serialize(ref node.ShadowMapScale);
     sc.Serialize(ref node.LightingChannels);
     if (sc.Game >= MEGame.ME3)
     {
         sc.Serialize(ref node.iLightmassIndex);
     }
     else
     {
         node.iLightmassIndex = 1;
     }
 }
Exemplo n.º 2
0
        public override List <(UIndex, string)> GetUIndexes(MEGame game)
        {
            var uIndexes = new List <(UIndex, string)>();

            uIndexes.Add((Self, nameof(Self)));
            for (int i = 0; i < Surfs.Length; i++)
            {
                BspSurf surf = Surfs[i];
                uIndexes.Add((surf.Material, $"Surfs[{i}].Material"));
                uIndexes.Add((surf.Actor, $"Surfs[{i}].Actor"));
            }

            uIndexes.AddRange(Zones.Select((zone, i) => (zone.ZoneActor, $"Zones[{i}].ZoneActor")));
            uIndexes.Add((Polys, nameof(Polys)));

            return(uIndexes);
        }