fix: score from last round is now added to marker account

This commit is contained in:
catarrh committed 2026-07-24 23:50:19 +03:00
1 parent 85e59b4cfe
commit 97287848eb
1 file changed
+5
+5
View File
@@ -558,6 +558,11 @@ function update() {
if (winner) { if (winner) {
winner.score += SCORE_FOR_WIN; winner.score += SCORE_FOR_WIN;
} }
const humanPlayer = players.find(p => !p.ai);
if (humanPlayer) {
score += humanPlayer.kills * SCORE_PER_KILL;
if (winner === humanPlayer) score += SCORE_FOR_WIN;
}
menuState.scoreAwarded = true; menuState.scoreAwarded = true;
} }
if (key('Enter')) { if (key('Enter')) {