Example #1
0
 public void LoadStaticMeshComponents()
 {
     for (int i = 0; i < UStatComp.Count; i++)
     {
         int entry = UPR.FindObjectProperty("StaticMesh", UStatComp[i].props);
         if (entry >= 0 && entry < pcc.Header.ExportCount)
         {
             if (pcc.getClassName(pcc.Export[entry].Class) == "StaticMesh")
             {
                 UStaticMesh t = new UStaticMesh(pcc.EntryToBuff(entry), pcc.names);
                 t.ReadProperties(4);
                 t.index  = entry;
                 t.index2 = UStatComp[i].index;
                 t.index3 = i;
                 entry    = UPR.FindProperty("Scale3D", UStatComp[i].props);
                 LevelProperties LP = UStatComp[i].LP;
                 GlobalTransform g  = UStatComp[i].LP.GT;
                 if (entry != -1)
                 {
                     Vector3 v = PropToVector3(UStatComp[i].props[entry + 1].raw);
                     g.scl.X *= v.X;
                     g.scl.Y *= v.Y;
                     g.scl.Z *= v.Z;
                 }
                 g.scl *= g.scl2;
                 LP.GT  = g;
                 t.LP   = LP;
                 UStat.Add(t);
             }
         }
     }
 }
Example #2
0
 public void LoadStaticMeshComponents()
 {
     for (int i = 0; i < UStatComp.Count; i++)
     {
         int entry = UPR.FindObjectProperty("StaticMesh", UStatComp[i].props);
         if (entry >= 0 && entry < pcc.Header.ExportCount)
             if (pcc.getClassName(pcc.Export[entry].Class) == "StaticMesh")
             {
                 UStaticMesh t = new UStaticMesh(pcc.EntryToBuff(entry), pcc.names);
                 t.ReadProperties(4);
                 t.index = entry;
                 t.index2 = UStatComp[i].index;
                 t.index3 = i;
                 entry = UPR.FindProperty("Scale3D", UStatComp[i].props);
                 LevelProperties LP = UStatComp[i].LP;
                 GlobalTransform g = UStatComp[i].LP.GT;
                 if (entry != -1)
                 {
                     Vector3 v = PropToVector3(UStatComp[i].props[entry + 1].raw);
                     g.scl.X *= v.X;
                     g.scl.Y *= v.Y;
                     g.scl.Z *= v.Z;
                 }
                 g.scl *= g.scl2;
                 LP.GT = g;
                 t.LP = LP;
                 UStat.Add(t);
             }
     }
 }