We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a23e187 commit 7a64557Copy full SHA for 7a64557
sc2reader/replay.py
@@ -323,14 +323,7 @@ def load_events(self, datapack=None):
323
self.packets = self.raw_data['replay.message.events'].pings
324
self.events += self.messages+self.pings+self.packets
325
326
- #Mix them all up and sort them for playback
327
- def sortEvents(x,y):
328
- result = x.frame-y.frame
329
- if result == 0:
330
- result = x.pid-y.pid
331
- return result
332
-
333
- self.events = sorted(self.events, cmp=sortEvents)
+ self.events = sorted(self.events, key=lambda e: e.frame)
334
335
for event in self.events:
336
event.load_context(self)
0 commit comments