Skip to content

Fix custom partial animations from custom IFP banks staying rigid - #5128

Merged
FileEX merged 1 commit into
multitheftauto:masterfrom
TheCrazy17:fix/custom-partial-anim-custom-banks
Aug 2, 2026
Merged

Fix custom partial animations from custom IFP banks staying rigid#5128
FileEX merged 1 commit into
multitheftauto:masterfrom
TheCrazy17:fix/custom-partial-anim-custom-banks

Conversation

@TheCrazy17

Copy link
Copy Markdown
Contributor

Summary

Fixes custom partial animations played straight from a custom IFP bank (via engineLoadIFP + setPedAnimation) leaving the ped rigid, the same padding problem #5101 fixed for engineReplaceAnimation.

CClientIFP pads every loaded animation out to 32 bones regardless of what the source IFP actually defines. #5101 trimmed that padding by comparing against the built-in animation being replaced, but an animation played directly from a custom bank has no built-in original to compare against, so the fix never applied there and the padding kept driving the root, pelvis and legs.

CClientIFP now records which bones an animation actually defines while parsing it. CAnimBlendAssociation gains RestrictToBones(mask), a sibling of RestrictToBonesOf driven by that record instead of a built-in original; CClientPed applies it once the animation is actually playing.

Motivation

Continuation of #5101. That fix only covered animations replacing a built-in one; partial animations loaded into their own custom bank and played directly still went rigid. Fixes #5121.

Test plan

Loaded a custom IFP with a partial animation (upper body only, e.g. crry_prtial) into a custom bank via engineLoadIFP, played it with setPedAnimation on a ped. Before the fix the ped froze in place; after, the custom animation plays on the upper body while walking, turning and leg movement keep working normally. Also re-tested #5101's original engineReplaceAnimation scenario to confirm that path is untouched.

Test script, thanks to @RughCuttle
partialtest.zip

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

CClientIFP pads every animation to 32 bones regardless of what the
source IFP defines; playing a partial one straight from a custom bank
had no built-in association to trim against, so the padding drove the
root, pelvis and legs and froze the ped.

CClientIFP now records which bones an animation actually defines
while parsing it. CAnimBlendAssociation gains RestrictToBones(mask),
a sibling of RestrictToBonesOf driven by that record instead of a
built-in original. CClientPed applies it once the gateway swap to
the custom hierarchy lands.
@RughCuttle

Copy link
Copy Markdown

Works. Tested this and it makes all partials play after engineLoadIFP like they should. now you can freeze by using parm time at -1 and it'll 100% freeze.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Aug 2, 2026
@FileEX FileEX added this to the 1.7 (Current) milestone Aug 2, 2026
@FileEX
FileEX merged commit 500d818 into multitheftauto:master Aug 2, 2026
10 checks passed
@TheCrazy17
TheCrazy17 deleted the fix/custom-partial-anim-custom-banks branch August 2, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't load partial animations with engineLoadIFP

3 participants