Closed zkennyanderson closed 4 years ago
@zkennyanderson I think it's fine to update the nkcommon13
branch and we'll cherrypick the changes onto master as well.
Should we move all the hooks (and potentially other stuff passed into Register) into PartyConfig so we're not breaking the API every time we add/remove hooks going forward?
I like this idea, want to do this as part of this PR or in a follow-up one?
It would be good to pick either "MatchTerminateHook" or "MatchEndHook" for the hook name
I think MatchEndHook
should be the name. I can see a few matchTerminateHook
variable names which I think are left over from older iterations of the code. We should standardise on "end". :+1:
The MatchEndHook was not firing when the match ended due to the last user leaving.
Definitely a bug, nice find!
Thanks for taking a look! I'll update this PR w/ those changes
This should be good to go now
I'm not sure if you want to accept changes to the nkcommon13 branch, but we needed to make some changes to add/fix party hooks.
A couple Qs:
Should we move all the hooks (and potentially other stuff passed into Register) into PartyConfig so we're not breaking the API every time we add/remove hooks going forward?
It would be good to pick either "MatchTerminateHook" or "MatchEndHook" for the hook name and get rid of the other. I'm happy to add that change, but figured might as well answer the above question about PartyConfig first.
The MatchEndHook was not firing when the match ended due to the last user leaving. Was that intentional? I've added the callback into MatchLeave() to fix.