Skip to content

Conversation

@ASpoonPlaysGames
Copy link
Contributor

Maybe supercedes #757

Explanation for the change copied from #757:

Did some further investigation into this, it seems that as per the comment here:

bool gamePlayingOrSuddenDeath = GamePlayingOrSuddenDeath() // Storing this off here, the game state can change in the callbacks below which may cause kills to not count

The gamestate is being changed in one of the callbacks there. The kill counts because it is checking against the old gamestate, but later on during PostDeathThread_MP when we handle the death stat, the gamestate has been changed already so we get a mismatch

The check we use should really be if ( GamePlayingOrSuddenDeath() && !file.playerDeathsHidden ) we just have an order of operations issue underlying this.

EDIT:
in _gamestate_mp.nut a player killed callback is registered, which handles checking for final kills, and setting the winning team. The order of operations is as follows:

  • player is killed
  • gamestate is stored for tracking kills
  • winner is determined due to final kill logic (gamestate changes)
  • stored gamestate is checked for tracking kills
  • non-stored gamestate is checked for tracking deaths and death is not registered

@github-actions github-actions bot added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Dec 3, 2025
Copy link
Member

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks good.
Merging to test in production.

@Alystrasz Alystrasz removed needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Dec 21, 2025
@Alystrasz Alystrasz merged commit a0c494d into R2Northstar:main Dec 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants