-
Notifications
You must be signed in to change notification settings - Fork 30
Bugfix/fix multiserver session state updates #5
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
Bugfix/fix multiserver session state updates #5
Conversation
Updated server map in LaunchServer.bat to match server default map in editor config
Update map in LaunchServer.bat
Readme image
{ | ||
// There's an offset of 1 between the corresponding states of session progress and session state. | ||
int SessionState = (int)SessionProgress + 1; | ||
SendStateUpdate(SessionState); |
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.
I realise you haven't changed this, but could we switch SendStateUpdate to internally use SessionProgress (and use a static_cast<> to cast it to and int), and offset it by 1 in the component update?
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.
Is it better now?
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.
Few nits - looks great!
…on game state is applied.
} | ||
|
||
void AGDKSessionGameState::SendStateUpdate(int NewState) | ||
void AGDKSessionGameState::SendStateUpdate(EGDKSessionProgress SessionProgress) |
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 is hiding a member variable name and will cause a warning, perhaps rename to InSessionProgress
.
Co-Authored-By: Michael Samiec <michaelsamiec@improbable.io>
We are currently not doing any authority checks for updating the two session components, this PR makes sure that only the authoritative server makes the updates.
Note: we need to merge release into master (see this PR) before merging this change in, as it will otherwise come with a bunch of unrelated commits.