Skip to content

Commit 824bf46

Browse files
committed
Fixes another small bug persistant from the switch to different player organization; this time in the Replay._process_results function
1 parent e5abdac commit 824bf46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sc2reader/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def __init__(self, pid, data, realm="us"):
162162
self.type = "" # Human or Computer
163163

164164
def __str__(self):
165-
return "Player %s - %s (%s)" % (self.pid, self.name, self.race)
165+
return "Player %s - %s (%s)" % (self.pid, self.name, self.actual_race)
166166

167167
def __repr__(self):
168168
return str(self)

sc2reader/replay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def _process_results(self):
153153
self.results = dict([team, len(players)] for team, players in self.teams.iteritems())
154154
for event in self.events_by_type['leave']:
155155
#Some spectator actions seem to be recorded, they aren't on teams anyway
156-
if event.player < len(self.players):
156+
if event.player <= len(self.players):
157157
team = self.player[event.player].team
158158
self.results[team] -= 1
159159

0 commit comments

Comments
 (0)