.HIDE. Hey git pls. See last commit message
This commit is contained in:
parent
fdec8620fb
commit
74f3ec0f4c
|
@ -29,9 +29,8 @@ def handle(userToken, packetData):
|
||||||
|
|
||||||
# Give host to match creator
|
# Give host to match creator
|
||||||
match.setHost(userID)
|
match.setHost(userID)
|
||||||
|
match.sendUpdates()
|
||||||
# Send match create packet to everyone in lobby
|
match.changePassword(packetData["matchPassword"])
|
||||||
glob.streams.broadcast("lobby", serverPackets.createMatch(matchID))
|
|
||||||
|
|
||||||
# Console output
|
# Console output
|
||||||
log.info("MPROOM{}: Room created!".format(matchID))
|
log.info("MPROOM{}: Room created!".format(matchID))
|
||||||
|
|
|
@ -44,13 +44,6 @@ class match:
|
||||||
self.mods = 0
|
self.mods = 0
|
||||||
self.matchName = matchName
|
self.matchName = matchName
|
||||||
self.matchPassword = matchPassword
|
self.matchPassword = matchPassword
|
||||||
log.debug("Password: {}".format(self.matchPassword))
|
|
||||||
# NOTE: Password used to be md5-hashed, but the client doesn't like that.
|
|
||||||
# So we're back to plain text passwords, like in normal osu!
|
|
||||||
#if matchPassword != "":
|
|
||||||
# self.matchPassword = generalUtils.stringMd5(matchPassword)
|
|
||||||
#else:
|
|
||||||
# self.matchPassword = ""
|
|
||||||
self.beatmapID = beatmapID
|
self.beatmapID = beatmapID
|
||||||
self.beatmapName = beatmapName
|
self.beatmapName = beatmapName
|
||||||
self.beatmapMD5 = beatmapMD5
|
self.beatmapMD5 = beatmapMD5
|
||||||
|
@ -70,7 +63,6 @@ class match:
|
||||||
# Create streams
|
# Create streams
|
||||||
glob.streams.add(self.streamName)
|
glob.streams.add(self.streamName)
|
||||||
glob.streams.add(self.playingStreamName)
|
glob.streams.add(self.playingStreamName)
|
||||||
self.sendUpdates()
|
|
||||||
|
|
||||||
# Create #multiplayer channel
|
# Create #multiplayer channel
|
||||||
glob.channels.addTempChannel("#multi_{}".format(self.matchID))
|
glob.channels.addTempChannel("#multi_{}".format(self.matchID))
|
||||||
|
@ -80,6 +72,7 @@ class match:
|
||||||
Return binary match data structure for packetHelper
|
Return binary match data structure for packetHelper
|
||||||
"""
|
"""
|
||||||
# General match info
|
# General match info
|
||||||
|
# TODO: Test without safe copy, the error might have been caused by outdated python bytecode cache
|
||||||
safeMatch = copy.deepcopy(self)
|
safeMatch = copy.deepcopy(self)
|
||||||
struct = [
|
struct = [
|
||||||
[safeMatch.matchID, dataTypes.UINT16],
|
[safeMatch.matchID, dataTypes.UINT16],
|
||||||
|
@ -121,6 +114,7 @@ class match:
|
||||||
struct.append([safeMatch.slots[i].mods, dataTypes.UINT32])
|
struct.append([safeMatch.slots[i].mods, dataTypes.UINT32])
|
||||||
|
|
||||||
# Seed idk
|
# Seed idk
|
||||||
|
# TODO: Implement this, it should be used for mania "random" mod
|
||||||
struct.append([safeMatch.seed, dataTypes.UINT32])
|
struct.append([safeMatch.seed, dataTypes.UINT32])
|
||||||
|
|
||||||
return struct
|
return struct
|
||||||
|
@ -462,7 +456,7 @@ class match:
|
||||||
# Console output
|
# Console output
|
||||||
log.info("MPROOM{}: Password changed to {}".format(self.matchID, self.matchPassword))
|
log.info("MPROOM{}: Password changed to {}".format(self.matchID, self.matchPassword))
|
||||||
|
|
||||||
def changeMatchMods(self, mods):
|
def changeMods(self, mods):
|
||||||
"""
|
"""
|
||||||
Set match global mods
|
Set match global mods
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from objects import match
|
from objects import match
|
||||||
from objects import glob
|
from objects import glob
|
||||||
from constants import serverPackets
|
from constants import serverPackets
|
||||||
|
from common.log import logUtils as log
|
||||||
|
|
||||||
class matchList:
|
class matchList:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user