-
-
Notifications
You must be signed in to change notification settings - Fork 535
Add the ability to load IFP animations without compression #4664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
qaisjp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't review the code but
@MegadreamsBE tested this.
Could you go into more detail into what the actual tests were? E.g. sample resources that they tested against
This branch master...FileEX:mtasa-blue:megadreams/object-animations_with_clumps was used for testing, because currently MTA doesn’t include object animations or the ability to replace clump-type models (#4555 and #4052). Test resource: I personally don’t know cutscene animations very well, but MegaDreams is familiar with them, and the test resource comes from him. |
| } | ||
| } | ||
|
|
||
| void CClientIFP::ReadKr00FramesUncompressed(std::unique_ptr<CAnimBlendSequence>& pAnimationSequence, const std::int32_t& cFrames) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the ReadKr* methods are practically doing the same thing, couldn't an interface help cut down code-duplication here?
Two-fold: I ran multiple cutscene IFPs, which rely on uncompressed animations with this new code through my Sphene project. No crashes nor issues were observed. I can vow for the stability of this change. |
Summary
This PR adds an optional uncompressedAnimations argument to the
engineLoadIFPfunction, allowing you to specify which animations should be loaded without compression.Motivation
Currently, all IFP animations are loaded as compressed by default, regardless of whether compression is necessary. While testing PR #4555, @MegadreamsBE discovered several issues when using cutscene animations, including broken facial bones (fixed in #4565) and offset problems. It was determined that the issue occurs because all animations are loaded as compressed by default, whereas GTA loads some cutscene animations in a special way as uncompressed (the uncompress section in .cut files).
Test plan
@MegadreamsBE tested this.
Thanks to @Merlin for helping with the crash investigation.
Checklist