Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Commit

Permalink
Oops, I forgot a little thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Igoorx committed Jun 27, 2019
1 parent 88caf5e commit de5acd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions match.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def getPlayersData(self):

def onPlayerReady(self, player):
if not self.playing and self.autoStartTimer is None: # Ensure that the game starts even with fewer players
self.autoStartTimer = reactor.callLater(60, self.start)
self.autoStartTimer = reactor.callLater(60, self.start, True)

if self.world == "lobby" or not player.lobbier:
for p in self.players:
Expand All @@ -110,8 +110,8 @@ def voteStart(self):
if not self.playing and self.votes >= len(self.players) * 0.85:
self.start()

def start(self):
if self.playing or len(self.players) < 10: # We need at-least 10 players to start
def start(self, forced = False):
if self.playing or (not forced and len(self.players) < 10): # We need at-least 10 players to start
return
self.playing = True
try:
Expand Down

0 comments on commit de5acd3

Please sign in to comment.