.BANCHO. Cache match data for tourney client
This commit is contained in:
parent
b1399aaf6e
commit
2eb7fb609c
|
@ -7,4 +7,4 @@ def handle(userToken, packetData):
|
||||||
matchID = packetData["matchID"]
|
matchID = packetData["matchID"]
|
||||||
if matchID not in glob.matches.matches:
|
if matchID not in glob.matches.matches:
|
||||||
return
|
return
|
||||||
userToken.enqueue(serverPackets.updateMatch(matchID))
|
userToken.enqueue(glob.matches.matches[matchID].matchDataCache)
|
|
@ -60,6 +60,7 @@ class match:
|
||||||
self.matchTeamType = matchTeamTypes.headToHead # default value
|
self.matchTeamType = matchTeamTypes.headToHead # default value
|
||||||
self.matchModMode = matchModModes.normal # default value
|
self.matchModMode = matchModModes.normal # default value
|
||||||
self.seed = 0
|
self.seed = 0
|
||||||
|
self.matchDataCache = bytes()
|
||||||
|
|
||||||
# Create all slots and reset them
|
# Create all slots and reset them
|
||||||
self.slots = []
|
self.slots = []
|
||||||
|
@ -572,8 +573,9 @@ class match:
|
||||||
self.sendUpdates()
|
self.sendUpdates()
|
||||||
|
|
||||||
def sendUpdates(self):
|
def sendUpdates(self):
|
||||||
glob.streams.broadcast(self.streamName, serverPackets.updateMatch(self.matchID))
|
self.matchDataCache = serverPackets.updateMatch(self.matchID)
|
||||||
glob.streams.broadcast("lobby", serverPackets.updateMatch(self.matchID))
|
glob.streams.broadcast(self.streamName, self.matchDataCache)
|
||||||
|
glob.streams.broadcast("lobby", self.matchDataCache)
|
||||||
|
|
||||||
def checkTeams(self):
|
def checkTeams(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user