// Upload details about the current game state to the cloud // This is the responsibility of the system that initially created that room. // If that system disconnects, the new host, as determined by FullyConnectedMesh2 will reupload the room void PostRoomToCloud(void) { BitStream bsOut; DataStructures::List<NATTypeDetectionResult> natTypes; for (unsigned int i=0; i < game->users.Size(); i++) natTypes.Push(game->users[i]->natType, _FILE_AND_LINE_); SerializeToBitStream(&bsOut, game->gameName, natTypes); RakNet::CloudKey cloudKey("ComprehensiveGame_Rooms",0); cloudClient->Post(&cloudKey, bsOut.GetData(), bsOut.GetNumberOfBytesUsed(), game->masterServerGuid); printf("Posted game session. In room.\n"); }