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); } } } }
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); } } }
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); } } }
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); } }