From 4e3b9cbfd68bec67237d348c68e878aa88e4ba43 Mon Sep 17 00:00:00 2001 From: Andrea Toska Date: Mon, 30 Sep 2024 17:22:54 +0200 Subject: [PATCH] fix(secure): final fixups --- ...register_common_secure_server_protocols.go | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/nex/register_common_secure_server_protocols.go b/nex/register_common_secure_server_protocols.go index 3aaadf7..660e2e8 100644 --- a/nex/register_common_secure_server_protocols.go +++ b/nex/register_common_secure_server_protocols.go @@ -39,11 +39,6 @@ func stubGetPlayingSession(err error, packet nex.PacketInterface, callID uint32, lstPlayingSession := types.NewList[*match_making_types.PlayingSession]() - // * There are no sessions, I tell you! - //for _, playingSession := range playingSessions { - // lstPlayingSession.Append(playingSession) - //} - rmcResponseStream := nex.NewByteStreamOut(endpoint.LibraryVersions(), endpoint.ByteStreamSettings()) lstPlayingSession.WriteTo(rmcResponseStream) @@ -93,30 +88,6 @@ func cleanupMatchmakeSessionSearchCriteriasHandler(searchCriterias *types.List[* } } - -func gameSpecificMatchmakeSessionSearchCriteriaChecksHandler(searchCriteria *match_making_types.MatchmakeSessionSearchCriteria, matchmakeSession *match_making_types.MatchmakeSession) bool { - original := matchmakeSession.Attributes.Slice() - search := searchCriteria.Attribs.Slice() - if len(original) != len(search) { - return false - } - - for index, originalAttribute := range original { - // ignore dummy criterias for matchmaking - // everyone ends up in different rooms if you don't skip these - if index == 1 || index == 4 { - continue - } - searchAttribute := search[index] - - if !compareSearchCriteria(originalAttribute.Value, searchAttribute.Value) { - return false - } - } - - return true -} - func onAfterAutoMatchmakeWithParamPostpone(_ nex.PacketInterface, _ *match_making_types.AutoMatchmakeParam) { // * This is ugly but I can't work out a better way to do this // * Set Splatfest rooms to open participation @@ -140,13 +111,11 @@ func registerCommonSecureServerProtocols() { matchMakingProtocol := matchmaking.NewProtocol() globals.SecureEndpoint.RegisterServiceProtocol(matchMakingProtocol) - //commonmatchmaking.NewCommonProtocol(matchMakingProtocol) commonMatchMakingProtocol := commonmatchmaking.NewCommonProtocol(matchMakingProtocol) commonMatchMakingProtocol.SetManager(globals.MatchmakingManager) matchMakingExtProtocol := matchmakingext.NewProtocol() globals.SecureEndpoint.RegisterServiceProtocol(matchMakingExtProtocol) -// commonmatchmakingext.NewCommonProtocol(matchMakingExtProtocol) commonMatchMakingExtProtocol := commonmatchmakingext.NewCommonProtocol(matchMakingExtProtocol) commonMatchMakingExtProtocol.SetManager(globals.MatchmakingManager) @@ -155,7 +124,6 @@ func registerCommonSecureServerProtocols() { commonMatchmakeExtensionProtocol := commonmatchmakeextension.NewCommonProtocol(matchmakeExtensionProtocol) matchmakeExtensionProtocol.SetHandlerGetPlayingSession(stubGetPlayingSession) commonMatchmakeExtensionProtocol.CleanupMatchmakeSessionSearchCriterias = cleanupMatchmakeSessionSearchCriteriasHandler - fmt.Printf("Test") commonMatchmakeExtensionProtocol.OnAfterAutoMatchmakeWithParamPostpone = onAfterAutoMatchmakeWithParamPostpone commonMatchmakeExtensionProtocol.SetManager(globals.MatchmakingManager)