Skip to content

Commit a3f0a92

Browse files
committed
Improve PlayerStatsEvent documentation.
1 parent 279556b commit a3f0a92

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

sc2reader/events/tracker.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ def __str__(self):
2222

2323
class PlayerStatsEvent(TrackerEvent):
2424
"""
25-
Sometimes values in these fields can be negative.
26-
Clamp them to 0 until this is fixed.
25+
Player Stats events are generated for all players that were in the game
26+
even if they've since left every 10 seconds. An additional set of stats
27+
events are generated at the end of the game.
2728
28-
An additional stats event is sent the frame that a player leaves.
29-
That player still gets normal stats events for the rest of the game though.
29+
When a player leaves the game, a single PlayerStatsEvent is generated
30+
for that player and no one else. That player continues to generate
31+
PlayerStatsEvents at 10 second intervals until the end of the game.
32+
33+
In 1v1 games, the above behavior can cause the losing player to have 2
34+
events generated at the end of the game. One for leaving and one for
35+
the end of the game.
3036
"""
3137
name = 'PlayerStatsEvent'
3238

0 commit comments

Comments
 (0)