Skip to content

Conversation

@eheimburg
Copy link
Contributor

@eheimburg eheimburg commented Mar 22, 2021

  • The base class for all the game state objects now handles OnApplicationQuit() and calls StopClient(), StopServer(), or StopHost() as appropriate
  • There was no client-side game-state object for the post-game scene, so added one (just a stub so that the base-class gets called)
  • Fixed a bug with shutdown logic that didn't check whether the NetworkManager.Singleton has become null. (There may be more of these... they're hard to find because object-destruction order is unpredictable. But I didn't see any more after starting/stopping the client a dozen times.)

Edit: another bug-fix needed the fixes from this PR, so I bundled it into the same branch:

  • Client correctly returns to main menu if connection to host is lost [GOMPS-327]

- The "game state" object base class now handles OnApplicationQuit() and calls StopClient(), StopServer(), or StopHost() as appropriate
- There was no client-side game logic for the post-game scene, so added one (just a stub so that the base-class gets called)
- Fixed a bug with shutdown logic that doesn't check whether the NetworkManager.Singleton has become null. (There may be more of these -- they're hard to find because object-destruction order is unpredictable. But I didn't see any more after starting/stopping the client a few dozen times.)
@eheimburg eheimburg changed the title Bugfix: properly disconnect on quit [GOMPS-324] Bugfix: properly disconnect on quit [GOMPS-324] and [GOMPS-327] Mar 22, 2021
@eheimburg
Copy link
Contributor Author

Also checked in [GOMPS-327] here. (Previously this bug was FIXME'd because of MLAPI problems, but those problems are contained now)

@SamuelBellomo SamuelBellomo added the 1-Needs Review PR needs attention from the assignee and reviewers label Mar 22, 2021
@eheimburg eheimburg changed the title Bugfix: properly disconnect on quit [GOMPS-324] and [GOMPS-327] Bugfix: properly disconnect on quit [GOMPS-324][GOMPS-327][GOMPS-385] Mar 23, 2021
@eheimburg
Copy link
Contributor Author

A note -- [GOMPS-385] is also fixed by this checkin. That's the bug where pressing "Main Menu" on the post-game screen will crash if the host has quit. With this PR, the player will automatically leave the post-game screen as soon as the host quits, so they can't get into that invalid state.

@pdeschain pdeschain added 3-Good to Merge and removed 1-Needs Review PR needs attention from the assignee and reviewers labels Mar 26, 2021
@SamuelBellomo SamuelBellomo merged commit 6b0ae02 into release/v0.1.0-experimental Mar 26, 2021
@SamuelBellomo SamuelBellomo deleted the feature/disconnect-on-quit branch March 26, 2021 19:15
SamuelBellomo added a commit that referenced this pull request Mar 30, 2021
* release/v0.1.0-experimental: (97 commits)
  adding screenshots (#228)
  [GOMPS-352] Add audiomixer to project (#222)
  feature: transport picker improvements (#200)
  fixing issue where client disconnect boots everyone else (#229)
  removed GC allocs inside of AIBrain (#210)
  init client door with server's current value for IsOpen (#227)
  Photon Realtime Setup Guide for Boss Room (#225)
  Update README.md add link to doc (#226)
  Bug fix: hide icons for unimplemented attacks
  feature: v0.1.0 experimental updating to latest master mlapi (#220)
  fixing missing reference exceptions, and missing animation (#219)
  feat: replace with photon package (#218)
  Replaced LobbyPlayerArray with a NetworkList<LobbyPlayerState> (#217)
  ART:  Warning Message fixes for models, animations, and Shader...and new App icon (#213)
  Updating to latest MLAPI on master (#214)
  null guard added inside of target action for accessing a possibly destroyed reticule (#212)
  [GOMPS-270] bossroom should let users specify connection port# (#205)
  Fix useless log error (#203)
  Bugfix: properly disconnect on quit [GOMPS-324][GOMPS-327][GOMPS-385] (#196)
  Volume control [GOMPS-373] (#195)
  ...

# Conflicts:
#	README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants