Skip to content
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

[Bug] CEM animation unexpected output when references used #7835

Open
FFreshLX opened this issue Dec 10, 2024 · 1 comment
Open

[Bug] CEM animation unexpected output when references used #7835

FFreshLX opened this issue Dec 10, 2024 · 1 comment

Comments

@FFreshLX
Copy link

Description of Issue

It seems that when a part/variable references itself (to get the vanilla animation), any added expressions don't output as expected. I have used the pig as a test.

the-more-bones-animd-the-multiplier-increases For each line of anims there are, the anim following the reference (+torad(45) in this case) is added again. The referenced vanilla anim itself is unaffected. the-bone-the-anims-are-on-doesnt-add When the anims for the part are added to that same part, it works as expected on its own (left).

Some alternatives I tried to get around it that seemed to make no difference:
-"var.leg1": "leg1.rx +torad(45)", "leg1.rx": "var.leg1"
-"var.leg1": "leg1.rx", "leg1.rx": "var.leg1 +torad(45)"

Steps to Reproduce

  1. Create a CEM.
  2. Add animations, including a part referencing itself like in the screenshots above.

OptiFine Version

Tested in 1.21.3 J2, 1.21.1 J1, 1.20.6 J1 pre18.
Also tested in 1.20.4 I7 where the issue doesn't occur.

Installation Method

Standalone installer used.

F3 Debug Screenshot

image

Additional Information

This is an issue I noticed when using Fresh Animations, as some mobs use the vanilla animations. For example the Sniffer, with which I overlay the custom anims over the vanilla keyframe anims. Or the Pillager and Piglin, where the vanilla animation is used for holding/reloading a crossbow.

@ZenithRogue
Copy link
Collaborator

It appears that OptiFine is evaluating the animation string as multiple times, equal to the number of lines defined, hence the +45deg every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants