I’m running into a weird problem and I want to know if it is normal or if I’m missing something.
Here’s the situation :
- I’m developping a multiplayer game in XNA for WP7
- When a user quits the game (enters in tombstoning or exiting), I want to warn others players that a player left
- I override the
Game.OnExiting()method to call my Web Service, and I have put a breakpoint on this line - Each time, the breakpoint gets hit, the call is made, no error occurs, but the server never receives the call
Is it normal that the call is not processed on the server because the game is exiting?
Here’s the code :
protected override void OnExiting(object sender, EventArgs args)
{
if (GameManager.Instance.IsOnlineGame && !Guide.IsVisible)
{
GameManager.Instance.Multiplayer.QuitGame();
}
base.OnExiting(sender, args);
}
internal void QuitGame()
{
_client.QuitGameAsync(GameManager.Instance.GameId, _myRank);
}
Scientific explanations:
Credits : dadoo Games on http://forums.create.msdn.com/forums/t/79737.aspx