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

Event.FireToClient fixups #573

Merged
merged 2 commits into from Jan 4, 2017
Merged

Event.FireToClient fixups #573

merged 2 commits into from Jan 4, 2017

Conversation

psychonic
Copy link
Member

This removes a couple of checks that are IMO unnecessary. See commit messages for details and reasoning.

The handle does not get mutated here, so it is safe. Since we
don't currently support cloning event handles or copying events,
this also facilitates the only easy way of firing an existing game-
created event to a client.
Event.FireToClient should not care whether or not broadcasting
is enabled for the event since we're already intentionally not
broadcasting.
@dvander
Copy link
Member

dvander commented Jan 3, 2017

🚢

@Kenzzer
Copy link
Member

Kenzzer commented Jan 3, 2017

Funny thing is, dontbroadcast bugged me on the previous PR #505.
I got a question regarding that function, can we now hook an event with pre flag, and set the dontbroadcast boolean on true and "refire" it to one client. Or we need to copy all the event?
Because I tried it (not your recent changes), and it didn't work.

@psychonic
Copy link
Member Author

@Benoist3012 Yes, that was the original intent. The example code in that PR showed it working, when it really didn't. I had either missed that case in my testing, or tested before adding the handle ownership check.

@KyleSanderson
Copy link
Member

should probably fix this up as well.

@psychonic
Copy link
Member Author

@KyleSanderson I think we want to keep that check since the handle gets freed at the end of that path.

@psychonic psychonic merged commit d931279 into master Jan 4, 2017
@peace-maker
Copy link
Member

This should land in 1.8 too!

@psychonic
Copy link
Member Author

psychonic commented Feb 19, 2017 via email

@asherkin asherkin deleted the firetoclient-fixups branch February 2, 2018 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants