Skip to content

Commit

Permalink
FBX: Fix M2FBX causing eof error when loading MTB
Browse files Browse the repository at this point in the history
  • Loading branch information
Greavesy1899 committed Nov 25, 2024
1 parent a126a40 commit ba2fafd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions M2FBX/M2FBX/Source/MTObject/MT_ObjectHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ void MT_ObjectHandler::WriteBundleToFile(const std::string& FileName, const MT_O
WriteObjectToFile(OutStream, *Object);
}

// Write animations
const MT_Animation* BundleAnim = Bundle.GetAnimation();
FileUtils::Write<uint32_t>(OutStream, (BundleAnim != nullptr ? 1 : 0));
if (BundleAnim)
{
BundleAnim->WriteToFile(OutStream);
}

fclose(OutStream);
}

Expand Down
Binary file modified Mafia2Libs/libs/M2FBX.dll
Binary file not shown.

0 comments on commit ba2fafd

Please sign in to comment.