bug(stats): win events can be double-counted if multiple WinEvent fire in the same frame #69
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
stats_plugin.rsiterates allWinEventevents in a single system. If, due to a race or a replay fast-forward, multipleWinEvents fire in the same frame, the stats counter increments multiple times for what should be a single win.Affected file
solitaire_engine/src/stats_plugin.rsFix
Drain only the first win event per frame (or deduplicate by game session ID):
Or add a
game_idtoWinEventand track which game IDs have already been counted.