From 5fffd1c57b7b68b861ed1b70eb67fad11cc28754 Mon Sep 17 00:00:00 2001 From: Andrea Toska Date: Mon, 30 Sep 2024 13:37:27 +0200 Subject: [PATCH] fix(secure): using another function --- nex/register_common_secure_server_protocols.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nex/register_common_secure_server_protocols.go b/nex/register_common_secure_server_protocols.go index bbdc457..052379f 100644 --- a/nex/register_common_secure_server_protocols.go +++ b/nex/register_common_secure_server_protocols.go @@ -86,13 +86,9 @@ func compareSearchCriteria[T ~uint16 | ~uint32](original T, search string) bool } } -func cleanupMatchmakeSessionSearchCriteriasHandler(searchCriterias *types.List[*matchmakingtypes.MatchmakeSessionSearchCriteria]) { - search := searchCriterias.Slice(); - - for _, searchCriteriasElem := range search { - searchCriteriasElem.Attribs.DeleteIndex(1); - searchCriteriasElem.Attribs.DeleteIndex(4); - } +func cleanupSearchMatchmakeSession(matchmakeSession *match_making_types.MatchmakeSession) { + matchmakeSession.Attributes.DeleteIndex(1); + matchmakeSession.Attributes.DeleteIndex(4); } func gameSpecificMatchmakeSessionSearchCriteriaChecksHandler(searchCriteria *matchmakingtypes.MatchmakeSessionSearchCriteria, matchmakeSession *matchmakingtypes.MatchmakeSession) bool { @@ -155,7 +151,7 @@ func registerCommonSecureServerProtocols() { globals.SecureEndpoint.RegisterServiceProtocol(matchmakeExtensionProtocol) commonMatchmakeExtensionProtocol := commonmatchmakeextension.NewCommonProtocol(matchmakeExtensionProtocol) matchmakeExtensionProtocol.SetHandlerGetPlayingSession(stubGetPlayingSession) - commonMatchmakeExtensionProtocol.CleanupMatchmakeSessionSearchCriterias = cleanupMatchmakeSessionSearchCriteriasHandler + commonMatchmakeExtensionProtocol.CleanupSearchMatchmakeSession = cleanupSearchMatchmakeSession commonMatchmakeExtensionProtocol.OnAfterAutoMatchmakeWithParamPostpone = onAfterAutoMatchmakeWithParamPostpone commonMatchmakeExtensionProtocol.SetManager(globals.MatchmakingManager)