Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bancho.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hugo "ThePooN" Denizart
bancho.js
Commits
4cb0ae5f
Commit
4cb0ae5f
authored
May 18, 2019
by
Hugo "ThePooN" Denizart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BanchoLobby: Fix matchFinished not setting playing to false
parent
7ceea314
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
lib/Multiplayer/BanchoLobby.js
lib/Multiplayer/BanchoLobby.js
+2
-1
tests/TestGoals.js
tests/TestGoals.js
+2
-0
tests/units/MultiplayerLobbiesUnit.js
tests/units/MultiplayerLobbiesUnit.js
+6
-0
No files found.
lib/Multiplayer/BanchoLobby.js
View file @
4cb0ae5f
...
...
@@ -325,10 +325,11 @@ class BanchoLobby extends EventEmitter {
// This ensures sorting/emitting is executed after all names are resolved.
this
.
pushPlayerCreationQueue
(()
=>
{
this
.
sortScores
();
this
.
playing
=
false
;
this
.
emit
(
regex
.
name
,
this
.
scores
);
this
.
playersCreationCallback
();
});
});
});
break
;
case
"
invalidBeatmapId
"
:
case
"
passwordRemoved
"
:
...
...
tests/TestGoals.js
View file @
4cb0ae5f
...
...
@@ -29,7 +29,9 @@ const TestGoals = {
MultiplayerLobbyUnlockSlots
:
Symbol
(
"
MultiplayerLobbyUnlockSlots
"
),
MultiplayerLobbyClearHost
:
Symbol
(
"
MultiplayerLobbyClearHost
"
),
MultiplayerLobbyStartMatch
:
Symbol
(
"
MultiplayerLobbyStartMatch
"
),
MultiplayerLobbyPlayingTrue
:
Symbol
(
"
MultiplayerLobbyPlayingTrue
"
),
MultiplayerLobbyAbortMatch
:
Symbol
(
"
MultiplayerLobbyAbortMatch
"
),
MultiplayerLobbyPlayingFalse
:
Symbol
(
"
MultiplayerLobbyPlayingFalse
"
),
MultiplayerLobbyCloseLobby
:
Symbol
(
"
MultiplayerLobbyCloseLobby
"
)
};
...
...
tests/units/MultiplayerLobbiesUnit.js
View file @
4cb0ae5f
...
...
@@ -40,8 +40,14 @@ class MultiplayerLobbiesUnit extends TestUnit {
this
.
fulFillGoal
(
TestGoals
.
MultiplayerLobbyClearHost
);
await
channel
.
lobby
.
startMatch
();
this
.
fulFillGoal
(
TestGoals
.
MultiplayerLobbyStartMatch
);
if
(
channel
.
lobby
.
playing
!==
true
)
throw
new
Error
(
"
playing is not set to true after starting match!
"
);
this
.
fulFillGoal
(
TestGoals
.
MultiplayerLobbyPlayingTrue
);
await
channel
.
lobby
.
abortMatch
();
this
.
fulFillGoal
(
TestGoals
.
MultiplayerLobbyAbortMatch
);
if
(
channel
.
lobby
.
playing
!==
false
)
throw
new
Error
(
"
playing is not set to false after starting match!
"
);
this
.
fulFillGoal
(
TestGoals
.
MultiplayerLobbyPlayingFalse
);
await
channel
.
lobby
.
closeLobby
();
this
.
fulFillGoal
(
TestGoals
.
MultiplayerLobbyCloseLobby
);
clearTimeout
(
timeout
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment