RegisterEvent anonymous functions implementation (Additionally prevent CreateEventTimer() to register the same event more than one time)#474
Open
boubouleuh wants to merge 7 commits intoBeamMP:minorfrom
Conversation
…FromCustomEvent that was crashing the server on script reload, mStateFunctionQueue is now a deque additionally createEventTimer cant register the same event more than one time now
Contributor
Author
|
When trying to add more than one event timer it break tho idk how to fix 🫡 |
Contributor
Author
|
seems like i found the issues now it doesnt crash anymore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the usage of the function directly inside RegisterEvent() while keeping the possibility of using the function name.
This needed A LOT of changes; since I'm still a beginner in C++, there are probably a couple of issues that I would be happy to fix (can't imagine that there aren't any).
If this gets merged, it would be better to merge it before #473 to prevent conflicts regarding the
DontCallOnInitvariable that isn't completely removed in this PR but is in #473.ofc, I tested every changeand it seemed to work well (im just not sure about the
queuedlua console cmd)Closes #449
Closes #441 the panichandler is fixed in this PR
By creating this pull request, I understand that code that is AI generated or otherwise automatically generated may be rejected without further discussion.
I declare that I fully understand all code I pushed into this PR, and wrote all this code myself and own the rights to this code.