Le Serjant b454c98758
All checks were successful
CI / build (pull_request) Successful in 33s
Fix #28: stash live stats for beforeunload so leaderboard gets real score
The beforeunload fallback in shell.html sends session-end data when the
user closes the tab. Previously Module._analyticsLastStats was only set
inside doEnd(), which runs when C explicitly ends a session. For the
very common case of a player closing the tab mid-game (first session),
the field was null and the fallback sent score 0.

Add analytics_stash_stats() which serialises current stats into
_analyticsLastStats every frame, so the beforeunload handler always
has up-to-date data regardless of when the tab is closed.
2026-03-19 05:24:43 +00:00
2026-03-16 20:42:03 +00:00
2026-02-28 18:03:47 +00:00
2026-02-28 18:03:47 +00:00
2026-03-02 20:32:28 +00:00
2026-02-28 18:03:47 +00:00
2026-03-05 17:38:46 +00:00
2026-03-14 16:29:10 +00:00
Description
No description provided
25 MiB
Languages
C 95.2%
Python 2.3%
HTML 1.4%
Makefile 1%
Dockerfile 0.1%