Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix seemingly incorrect round counter handling #5545

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented Jun 3, 2024

This corrects the round counter. From looking at it I believe the code has for a long time not been doing what it looked like it was doing. Specifically, the if (!game.shouldDeployThisRound()) check only ever returned true for start-of-game deployment, not reinforcements.

My recent changes restored the function to what it looked to be doing (and which I did not entirely understand) which meant that round counting now no longer progressed when reinforcements were due. This PR fixes it by removing the check entirely. Line 1867 of GameManager is the only place where the round count is ever increased so it has to do it without exception. To get initial deployment at round 0, it has to start at -1.

Hopefully
Fixes #5542

@SJuliez SJuliez merged commit cdba4d8 into MegaMek:master Jun 6, 2024
4 checks passed
@SJuliez SJuliez deleted the missing-round-increase branch June 14, 2024 13:48
SJuliez added a commit to SJuliez/megamek that referenced this pull request Aug 13, 2024
rjhancock added a commit that referenced this pull request Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Nightly] Game never progresses beyond round 7
2 participants