Logistik-Pause friert die Aktivzeit ein (Lehrer-Cockpit)
Problem: bei Pause lief die „Seit"-Zeit im Lehrer-Cockpit weiter, obwohl das Spiel steht — live-client.js akkumulierte activeMs unabhängig vom Pause-Zustand. - live-client.js: opt-in Pause-Unterstützung. window.__GGS_LIVE__.setPaused(bool) friert die activeMs-Buchhaltung ein (lastTickAt wird weiter aktualisiert, damit beim Fortsetzen nichts nachspringt). __paused zusätzlich im Heartbeat. Default aus → alle anderen Sims unberührt. - logistik game.html: Pause-/Auto-Button ruft setPaused(mode==='pause'). Verifiziert (Playwright): activeMs 0→2000 (läuft) → 2000 (Pause eingefroren) → 3999 (Fortsetzen). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3031,6 +3031,9 @@ window.pickText = function(opts) {
|
||||
LogistikEngine.startSimulation(game);
|
||||
}
|
||||
playerMode = mode;
|
||||
// Aktivzeit-Buchhaltung fürs Lehrer-Cockpit bei Pause einfrieren
|
||||
// (sonst läuft die „Seit"-Zeit weiter, obwohl das Spiel steht).
|
||||
try { if (window.__GGS_LIVE__) window.__GGS_LIVE__.setPaused(mode === 'pause'); } catch (_) {}
|
||||
setActiveSpeedBtn(btn);
|
||||
updateStatusUI();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user