-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement makeSafeForNet
more thoroughly for avatar-related messages
#191
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,11 @@ void MOUL::CoopCoordinator::write(DS::Stream* s) const | |
s->writeSafeString(m_synchBone); | ||
s->write<bool>(m_autoStartGuest); | ||
} | ||
|
||
bool MOUL::CoopCoordinator::makeSafeForNet() | ||
{ | ||
return (m_hostBrain == nullptr || m_hostBrain->makeSafeForNet()) | ||
&& (m_guestBrain == nullptr || m_guestBrain->makeSafeForNet()) | ||
// This can only be LinkToAgeMsg. | ||
&& (m_acceptMsg == nullptr || (m_acceptMsg->type() == ID_LinkToAgeMsg && m_acceptMsg->makeSafeForNet())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I would prefer to see us only run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, can do. I wanted to be safe here and keep DIRTSAND's existing behavior - before my changes here, a similar check was done in |
||
} |
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.
This check is more restrictive than strictly necessary (see comment). It hasn't caused any issues in my (limited) testing, but this can be loosened if necessary.