Add inMatch User property
This commit is contained in:
parent
2e2fb4c609
commit
a58965cb6d
3 changed files with 6 additions and 0 deletions
|
@ -135,6 +135,7 @@ module.exports = class {
|
|||
|
||||
// Set the user's current match to this match
|
||||
JoiningUser.currentMatch = match;
|
||||
JoiningUser.inMatch = true;
|
||||
|
||||
// Add user to the stream for the match
|
||||
global.StreamsHandler.addUserToStream(streamName, JoiningUser.uuid);
|
||||
|
|
|
@ -100,6 +100,8 @@ module.exports = class {
|
|||
break;
|
||||
}
|
||||
}
|
||||
// Make sure this leave call is valid
|
||||
if (MatchUser.inMatch) return;
|
||||
|
||||
// Make sure we don't run more than once
|
||||
// Again, client double firing packets.
|
||||
|
@ -119,6 +121,7 @@ module.exports = class {
|
|||
|
||||
break;
|
||||
}
|
||||
MatchUser.inMatch = false;
|
||||
|
||||
osuPacketWriter.MatchUpdate(this.createOsuMatchJSON());
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ module.exports = class {
|
|||
this.currentMatch = null;
|
||||
this.matchSlotId = -1;
|
||||
|
||||
this.inMatch = false;
|
||||
|
||||
this.isTourneyUser = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue