fix(match): eine pausierte Partie an ihrem stehenden Tick fortsetzen (T-03) - #118
Merged
Conversation
MatchRunner.StartMatch doubles as the pause menu's resume path, and it called Kernel.Start() with the default tick 0: the kernel rewound while the session and all systems kept their state. Player commands submitted after a resume targeted session ticks the kernel would reach minutes late or never — units 'stopped moving' after pause while state-driven systems (sites, production) visibly kept running. The defect shipped with the original P-pause and surfaced only when 21.8 put pause on ESC, a key players press. StartMatch now passes the standing kernel tick — correct for a fresh kernel (0) and a paused one alike. PlayMode regression test pins both halves: the tick must never jump backwards across pause/resume, and a move order after resume must still move the unit. Reproduced red (tick 20 -> 0) before the fix, green after. Verified: PlayMode PauseMenuTests 3/3, dotnet test 726/726.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Der Fehler
MatchRunner.StartMatchist zugleich der Fortsetzen-Pfad des Pausemenüs, rief aberKernel.Start()ohne Argument — und der Standardwert ist Tick 0.Damit spulte der Kernel bei jedem Fortsetzen zurück, während die Session und sämtliche Systeme ihren Stand behielten. Spielerbefehle, die nach dem Fortsetzen abgesetzt wurden, zielten auf Session-Ticks, die der Kernel erst Minuten später oder nie erreichte.
Im Spiel sah das so aus: Einheiten „hörten nach dem Pausieren auf, sich zu bewegen" — während zustandsgetriebene Systeme wie Baustellen und Produktion sichtbar weiterliefen. Genau diese Mischung macht den Befund so schwer zuzuordnen: es wirkt wie ein Bewegungsfehler, ist aber ein Zeitfehler.
Warum er erst jetzt auffällt
Der Defekt kam mit der ursprünglichen P-Pause ins Haus und lag seitdem still. Sichtbar wurde er erst, als Paket 21.8 die Pause auf ESC legte — eine Taste, die Spieler tatsächlich drücken.
Die Behebung
StartMatchübergibt jetzt den anstehenden Kernel-Tick. Das ist für beide Pfade richtig: ein frischer Kernel steht auf 0, ein pausierter auf seinem Stand. Die Einschränkung für relay-gestützte Kernel (genau einmal startbar) bleibt unberührt und ist im Docstring weiter begründet.Nachweis
PauseMenuTestspinnt beide Hälften: der Tick darf über Pause/Fortsetzen nie rückwärts springen, und ein Bewegungsbefehl nach dem Fortsetzen muss die Einheit auch wirklich bewegenPauseMenuTests3/3 grün; headless-Kette grün (Ergebnis im CI-Lauf dieses PRs)Betroffene Bereiche
Gameplay/Match/MatchRunner.cs(eine Zeile plus Docstring),Assets/Tests/PlayMode/PauseMenuTests.cs(neu),CHANGELOG.md.Kein Simulationseingriff im Sinne einer Regeländerung: der Kernel bekommt den Wert, den er ohnehin haben sollte. Keine Baseline-Bewegung.