From f5a34d9048473ee8616c71adfe28c2112bb8b762 Mon Sep 17 00:00:00 2001 From: Nyo Date: Sun, 4 Sep 2016 17:26:58 +0200 Subject: [PATCH] .BANCHO. .FIX. Fix multiplayer free mods --- events/changeActionEvent.py | 12 +++++++----- events/changeMatchModsEvent.py | 5 ----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/events/changeActionEvent.py b/events/changeActionEvent.py index fc049cf..45be8f2 100644 --- a/events/changeActionEvent.py +++ b/events/changeActionEvent.py @@ -24,12 +24,14 @@ def handle(userToken, packetData): packetData = clientPackets.userActionChange(packetData) # If we are not in spectate status but we're spectating someone, stop spectating - '''if userToken.spectating != 0 and userToken.actionID != actions.WATCHING and userToken.actionID != actions.IDLE and userToken.actionID != actions.AFK: - userToken.stopSpectating() + ''' +if userToken.spectating != 0 and userToken.actionID != actions.WATCHING and userToken.actionID != actions.IDLE and userToken.actionID != actions.AFK: + userToken.stopSpectating() - # If we are not in multiplayer but we are in a match, part match - if userToken.matchID != -1 and userToken.actionID != actions.MULTIPLAYING and userToken.actionID != actions.MULTIPLAYER and userToken.actionID != actions.AFK: - userToken.partMatch()''' +# If we are not in multiplayer but we are in a match, part match +if userToken.matchID != -1 and userToken.actionID != actions.MULTIPLAYING and userToken.actionID != actions.MULTIPLAYER and userToken.actionID != actions.AFK: + userToken.partMatch() + ''' # Update cached stats if our pp changedm if we've just submitted a score or we've changed gameMode if (userToken.actionID == actions.PLAYING or userToken.actionID == actions.MULTIPLAYING) or (userToken.pp != userHelper.getPP(userID, userToken.gameMode)) or (userToken.gameMode != packetData["gameMode"]): diff --git a/events/changeMatchModsEvent.py b/events/changeMatchModsEvent.py index f5d218b..3d63dd8 100644 --- a/events/changeMatchModsEvent.py +++ b/events/changeMatchModsEvent.py @@ -16,14 +16,9 @@ def handle(userToken, packetData): return match = glob.matches.matches[matchID] - # Host check - if userID != match.hostUserID: - return - # Set slot or match mods according to modType if match.matchModMode == matchModModes.freeMod: # Freemod - # Host can set global DT/HT if userID == match.hostUserID: # If host has selected DT/HT and Freemod is enabled, set DT/HT as match mod