Skip to content

Commit

Permalink
feat: updated to accept instantly
Browse files Browse the repository at this point in the history
  • Loading branch information
iholston committed Jun 14, 2024
1 parent 19bfde9 commit 564692b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ impl Acceptor {
while !self.terminate.load(Ordering::SeqCst) {
if !self.paused.load(Ordering::SeqCst) && self.game_running() {
if let Some(_) = self.session.as_ref().filter(|ls| ls.id == self.game_pid) {
if self.get_game_phase() == "Matchmaking" {
thread::sleep(Duration::from_millis(300));
continue;
}
if self.get_game_phase() == "ReadyCheck" {
self.accept_match();
thread::sleep(Duration::from_secs(1));
continue;
}
} else {
match LeagueSession::new(self.game_pid) {
Expand Down

0 comments on commit 564692b

Please sign in to comment.