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

Transition: all fails to compile #163

Closed
Dakror opened this issue Jan 12, 2021 · 2 comments
Closed

Transition: all fails to compile #163

Dakror opened this issue Jan 12, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Dakror
Copy link
Contributor

Dakror commented Jan 12, 2021

The RCSS property transition does not support the all value correctly. Looking into the history of the PropertyParserAnimation, this must have broken when changing from property names to ids, since the parsing error arises here:

if (target_property_ids.Empty() || transition.duration <= 0.0f || transition.reverse_adjustment_factor < 0.0f || transition.reverse_adjustment_factor > 1.0f

Back when strings were used, a property with name "all" was added to the property list [1], which now is empty

[1] 93dd452#diff-563e418bcc69ad0b05163f26c0174b84ff59c845532cf151cbfc5c5e903d5427L266

When i tried the small change of altering the parser validation to if ((!transition_list.all && target_property_ids.Empty()) || transition.duration <= 0.0f || transition.reverse_adjustment_factor < 0.0f || transition.reverse_adjustment_factor > 1.0f)
a vector out of bounds occurs as soon as we try to run the transition.

@mikke89 mikke89 added the bug Something isn't working label Jan 12, 2021
@mikke89
Copy link
Owner

mikke89 commented Jan 12, 2021

Alright, I made an effort at fixing this. Let me know if it doesn't work or any other issues appear.

@Dakror
Copy link
Contributor Author

Dakror commented Jan 12, 2021

looks fixed to me.

@Dakror Dakror closed this as completed Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants