From: brady Date: Sat, 20 Mar 2010 09:35:24 +0000 (+0000) Subject: testing X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=da08dd5249127eed106e041059d4fd987b17a65c;p=chaz%2Fcarfire testing git-svn-id: https://bd85.net/svn/cs3505_group@18 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- diff --git a/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs b/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs index 71f5bfe..e26d5e5 100644 --- a/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs +++ b/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs @@ -171,7 +171,6 @@ namespace CS_3505_Project_06 { currentState = lobbyState.Connected; networkGame.CreateSession(4); - players = networkGame.LocalGamers; } break; @@ -182,7 +181,11 @@ namespace CS_3505_Project_06 ready = false; } availableSessions = networkGame.FindSessions(); - + if (availableSessions != null) + { + networkGame.JoinSession(availableSessions[0]); + currentState = lobbyState.Connected; + } break; case lobbyState.Connected: @@ -198,6 +201,15 @@ namespace CS_3505_Project_06 } if (currentKeyboardState.IsKeyDown(Keys.R) && previousKeyboardState.IsKeyUp(Keys.R)) ready = true; + + if (networkGame.sessionExists()) + { + players = networkGame.LocalGamers; + } + else + currentState = lobbyState.Welcome; + + break; }