Skip to content

Commit 91dc822

Browse files
committed
Refs #96, no observers and AIs in ladder games.
1 parent dbc79d8 commit 91dc822

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sc2reader/resources.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,12 @@ def createPlayer(pid, pdata, attributes):
452452
hash_input = self.gateway+":"+','.join(player_names)
453453
self.people_hash = hashlib.sha256(hash_input).hexdigest()
454454

455+
# The presence of observers and/or computer players makes this not actually ladder
456+
# This became an issue in HotS where Training, vs AI, Unranked, and Ranked
457+
# were all marked with "amm" => Ladder
458+
if len(self.observers) > 0 or len(self.humans) != len(self.players):
459+
replay.is_ladder = False
460+
455461
def load_messages(self):
456462
if 'replay.message.events' in self.raw_data:
457463
self.messages = self.raw_data['replay.message.events'].messages

0 commit comments

Comments
 (0)