-
Notifications
You must be signed in to change notification settings - Fork 149
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
Common - Add CBA_fnc_execAfterNFrames from ZEN #1584
Conversation
imho this func has fairly rare use and I'd prefer not adding any additional overhead to the eachFrame block |
I could rewrite it in that format, however how would it work with the licensing/crediting? |
ZEN license (GPLv3) is compatible with CBA (GPLv2). In either case, feel free to borrow and adapt as needed. |
Thank you very much. |
This reverts commit 50df691.
Ported the code from ZEN directly over. |
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.
LGTM
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
When merged this pull request will:
an extra parameter toa new functionCBA_fnc_execNextFrame
CBA_fnc_execAfterNFrames
that allows you to specify by how many frames you want the execution of the passed code to be delayed by. Closes [Feature Request]: Add an extra parameter to CBA_fnc_execNextFrame for settable frame delay #1578.For robustness' sake I left the existing code ofCBA_fnc_execNextFrame
alone, which means if the delay is 1 frame, then it uses the old code.During testing I noticed there is a bug, where if you call the function in a certain manner, it (EDIT: it =
CBA_fnc_execNextFrame
) will add an extra frame of waiting. This also happens in the current steam release however, so I'm not sure if it's worth trying to fix.Here's the code I used to test this part specifically: