-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98a2806
commit e71f872
Showing
48 changed files
with
2,355 additions
and
1,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
package common_globals | ||
|
||
import ( | ||
"github.com/PretendoNetwork/nex-go/v2" | ||
match_making_types "github.com/PretendoNetwork/nex-protocols-go/v2/match-making/types" | ||
"sync" | ||
) | ||
|
||
type CommonMatchmakeSession struct { | ||
GameMatchmakeSession *match_making_types.MatchmakeSession // * Used by the game, contains the current state of the MatchmakeSession | ||
SearchMatchmakeSession *match_making_types.MatchmakeSession // * Used by the server when searching for matches, contains the state of the MatchmakeSession during the search process for easy compares | ||
ConnectionIDs *nex.MutexSlice[uint32] // * Players in the room, referenced by their connection IDs. This is used instead of the PID in order to ensure we're talking to the correct client (in case of e.g. multiple logins) | ||
} | ||
|
||
var Sessions map[uint32]*CommonMatchmakeSession | ||
var MatchmakingMutex *sync.RWMutex = &sync.RWMutex{} | ||
var GetUserFriendPIDsHandler func(pid uint32) []uint32 | ||
var CurrentGatheringID = nex.NewCounter[uint32](0) | ||
var CurrentMatchmakingCallID = nex.NewCounter[uint32](0) |
Oops, something went wrong.