Exemple #1
0
 public void LoadStaticMeshCollectionActors()
 {
     for (int i = 0; i < UStatColl.Count; i++)
     {
         for (int j = 0; j < UStatColl[i].Entries.Count; j++)
         {
             if (UStatColl[i].Entries[j] >= 0 && UStatColl[i].Entries[j] < pcc.Header.ExportCount)
             {
                 UStaticMeshComponent t = new UStaticMeshComponent(pcc.EntryToBuff(UStatColl[i].Entries[j]), pcc.names);
                 t.UPR = UPR;
                 t.Deserialize();
                 LevelProperties LP = UStatColl[i].LP;
                 GlobalTransform g  = new GlobalTransform();
                 g.m      = UStatColl[i].Matrices[j];
                 g.scl    = new Vector3(1, 1, 1);
                 g.scl2   = 1;
                 LP.GT    = g;
                 t.LP     = LP;
                 t.index  = UStatColl[i].Entries[j];
                 t.index2 = j;
                 t.index3 = i;
                 UStatComp.Add(t);
             }
         }
     }
 }
Exemple #2
0
        public UnrealObject(byte[] mem, string Uclass, string[] Names)
        {
            objectclass = Uclass;
            names       = Names;
            switch (objectclass)
            {
            case "DecalActor":
                UDecA = new UDecalActor(mem, names);
                break;

            case "DecalComponent":
                UDecC = new UDecalComponent(mem, names);
                break;

            case "InterpActor":
                UIntA = new UInterpActor(mem, names);
                break;

            case "StaticMesh":
                UStat = new UStaticMesh(mem, names);
                break;

            case "StaticMeshActor":
                UStatA = new  UStaticMeshActor(mem, names);
                break;

            case "StaticMeshComponent":
                UStatC = new UStaticMeshComponent(mem, names);
                break;

            case "SkeletalMesh":
                USkel = new USkelMesh(mem, names);
                break;

            case "Texture2D":
                UTex2D = new UTexture2D(mem, names);
                break;

            case "Material":
                UMat = new UMaterial(mem, names);
                break;

            case "WwiseStream":
                UWws = new UWwiseStream(mem, names);
                break;

            default:
                UUkn = new UnknownObject(mem, objectclass, names);
                break;
            }
        }
Exemple #3
0
 public void LoadStaticMeshActors()
 {
     for (int i = 0; i < UStatActors.Count; i++)
     {
         int entry = UPR.FindObjectProperty("StaticMeshComponent", UStatActors[i].props);
         if (entry >= 0 && entry < pcc.Header.ExportCount)
         {
             UStaticMeshComponent t = new UStaticMeshComponent(pcc.EntryToBuff(entry), pcc.names);
             t.UPR = UPR;
             t.Deserialize();
             LevelProperties LP = UStatActors[i].LP;
             GlobalTransform g  = new GlobalTransform();
             if (i == 21)
             {
             }
             entry = UPR.FindProperty("location", UStatActors[i].props);
             if (entry != -1)
             {
                 g.loc = PropToVector3(UStatActors[i].props[entry + 1].raw);
             }
             entry = UPR.FindProperty("Rotator", UStatActors[i].props);
             if (entry != -1)
             {
                 g.rot = PropToCYPRVector3(UStatActors[i].props[entry].raw);
             }
             entry = UPR.FindProperty("DrawScale3D", UStatActors[i].props);
             if (entry != -1)
             {
                 g.scl = PropToVector3(UStatActors[i].props[entry + 1].raw);
             }
             else
             {
                 g.scl = new Vector3(1, 1, 1);
             }
             entry = UPR.FindProperty("DrawScale", UStatActors[i].props);
             if (entry != -1)
             {
                 g.scl2 = BitConverter.ToSingle(UStatActors[i].props[entry + 1].raw, UStatActors[i].props[entry + 1].raw.Length - 4);
             }
             else
             {
                 g.scl2 = 1;
             }
             LP.GT   = g;
             t.LP    = LP;
             t.index = entry;
             UStatComp.Add(t);
         }
     }
 }
Exemple #4
0
 public void LoadInterpActors()
 {
     for (int i = 0; i < UIntAct.Count; i++)
     {
         int entry = UPR.FindObjectProperty("StaticMeshComponent", UIntAct[i].props);
         if (entry >= 0 && entry < pcc.Header.ExportCount)
         {
             UStaticMeshComponent t = new UStaticMeshComponent(pcc.EntryToBuff(entry), pcc.names);
             t.UPR = UPR;
             t.Deserialize();
             t.index = entry;
             LevelProperties LP = UIntAct[i].LP;
             GlobalTransform g = new GlobalTransform();
             entry = UPR.FindProperty("location", UIntAct[i].props);
             if (entry != -1) g.loc = PropToVector3(UIntAct[i].props[entry + 1].raw);
             entry = UPR.FindProperty("Rotator", UIntAct[i].props);
             if (entry != -1) g.rot = PropToCYPRVector3(UIntAct[i].props[entry].raw);
             entry = UPR.FindProperty("DrawScale3D", UIntAct[i].props);
             if (entry != -1) g.scl = PropToVector3(UIntAct[i].props[entry + 1].raw);
             else g.scl = new Vector3(1, 1, 1);
             entry = UPR.FindProperty("DrawScale", UIntAct[i].props);
             if (entry != -1) g.scl2 = BitConverter.ToSingle(UIntAct[i].props[entry + 1].raw, UIntAct[i].props[entry + 1].raw.Length - 4);
             else g.scl2 = 1;
             LP.GT = g;
             t.LP = LP;
             
             UStatComp.Add(t);
         }
     }
 }
Exemple #5
0
 public void LoadStaticMeshCollectionActors()
 {
     for (int i = 0; i < UStatColl.Count; i++)
         for (int j = 0; j < UStatColl[i].Entries.Count; j++)
             if (UStatColl[i].Entries[j] >= 0 && UStatColl[i].Entries[j] < pcc.Header.ExportCount)
             {
                 UStaticMeshComponent t = new UStaticMeshComponent(pcc.EntryToBuff(UStatColl[i].Entries[j]), pcc.names);
                 t.UPR = UPR;
                 t.Deserialize();
                 LevelProperties LP = UStatColl[i].LP;
                 GlobalTransform g = new GlobalTransform();
                 g.m = UStatColl[i].Matrices[j];
                 g.scl = new Vector3(1, 1, 1);
                 g.scl2 = 1;
                 LP.GT = g;
                 t.LP = LP;
                 t.index = UStatColl[i].Entries[j];
                 t.index2 = j;
                 t.index3 = i;
                 UStatComp.Add(t);
             }
 }