Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct FStaticMeshSection4
- // Apex Legends Mobile (new2)
- int32 unk_index, unk_verts;
- Ar.Seek(Ar.Tell() + 28);
- Ar << unk_index;
- Ar.Seek(Ar.Tell() + unk_index * 2);
- Ar << unk_verts;
- Ar.Seek(Ar.Tell() + unk_verts * 16);
- #if DAUNTLESS
- if (Ar.Game == GAME_Dauntless) Ar.Seek(Ar.Tell()+8); // 8 zero-filled bytes here
- #endif
- //?? Has editor-only data?
- return Ar;
- ----------------------------------------------------
- struct FStaticMeshLODModel4
- // Crackdown 3 & Apex Legends Mobile
- int32 unk_size, unk;
- Ar << unk_size << unk;
- FStripDataFlags StripFlags(Ar);
- Ar << Lod.Sections;
- ...
- uint32 SerializedBuffersSize, DepthOnlyIBSize, ReversedIBsSize;
- if (!bIsLODCookedOut)
- Ar << SerializedBuffersSize << DepthOnlyIBSize << ReversedIBsSize;
- ----------------------------------------------------
- static void SerializeBuffers
- // Apex Legends Mobile (new2)
- for (int i = 0; i < 2; i++)
- {
- FColorVertexBuffer4 DummyColorVertexBuffer;
- Ar << DummyColorVertexBuffer;
- }
- Ar << Lod.IndexBuffer;
- ----------------------------------------------------
- struct FColorVertexBuffer4
- // Apex Legends Mobile (beta)
- if (S.Stride > 4)
- {
- SkipBulkArrayData(Ar);
- return Ar;
- }
- DBG_MESH("ColorStream: IS:%d NV:%d\n", S.Stride, S.NumVertices);
- ----------------------------------------------------
- postprocessing after Lods.Serialize2<FStaticMeshLODModel4::Serialize>(Ar)
- // Apex Legends Mobile (new2)
- Ar.Seek(Ar.Tell() + 4);
- Ar << Bounds;
- if (Ar.Game >= GAME_UE4(15) && Ar.Game < GAME_UE4(16)) goto no_LODShareStaticLighting;
- // Apex Legends Mobile (new)
- int32 Count;
- Ar << Count;
- Ar.Seek(Ar.Tell() + Count * 12);
- ...
- // Apex Legends Mobile
- Ar.Seek(Ar.Tell() + 4);
- unguard;
- } // end of FStaticMeshRenderData
- ...
- if (bHasOccluderData)
- {
- // Apex Legends Mobile
- int unkSize;
- Ar << unkSize;
- for (int i = 0; i < unkSize; i++)
- {
- Ar.Seek(Ar.Tell() + 16 * 4);
- int elemSize;
- Ar << elemSize;
- Ar.Seek(Ar.Tell() + elemSize * 16);
- }
- Ar << unkSize;
- Ar.Seek(Ar.Tell() + unkSize * 12);
- }
- ----------------------------------------------------
- scaling from ExtendedBounds (doesnt work properly from Bounds)
- // Apex Legends Mobile (new2)
- UStaticMesh4* LoadingMesh = (UStaticMesh4*)UObject::GLoadingObj;
- FVector Scale = LoadingMesh->ExtendedBounds.BoxExtent;
- Scale.Scale(2);
- for (FStaticMeshLODModel4& Lod : Lods)
- {
- if (Lod.PositionVertexBuffer.Stride == 12) // depends on implementation of unpacking
- {
- for (FVector& V : Lod.PositionVertexBuffer.Verts)
- V.Scale(Scale);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement