Skip to content

Fix local player's players killed report not resetting each round#2018

Merged
nullsystem merged 3 commits into
NeotokyoRebuild:masterfrom
nullsystem:GH-1874_DmgReportRewrite
Jul 21, 2026
Merged

Fix local player's players killed report not resetting each round#2018
nullsystem merged 3 commits into
NeotokyoRebuild:masterfrom
nullsystem:GH-1874_DmgReportRewrite

Conversation

@nullsystem

@nullsystem nullsystem commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Two fixes: First m_bFirstAliveTick never gets updated when the player respawns past the first respawn since not dying on a round will not turn this to true and the respawn resets through m_bFirstAliveTick for local player in PreThink doesn't get utilized. This may also be the cause of other non-reset issues people seen before, but this has affected the killed players report especially.

Second, move the array from C_NEO_Player into its own global array as really it's only a single instance (for the local player) and pointless for every single C_NEO_Player to hold it. For sanity check, change from it being entity index array based to UserID based to be sure which is which when its displayed and not affected by entity index changes.

Killer info/scoreboard:

  • Checking for pre-round freeze in killer_info no longer needed
    • Now the c_neo_player first tick alive got fixed, can just do it
      there.
  • Use MAX_PLAYERS_ARRAY_SAFE
  • Move local player check

Toolchain

  • Linux GCC Distro Native Arch/GCC 16

Linked Issues

@nullsystem nullsystem added the Tournament Priority Issues to be prioritized for the upcoming NT;RE tournament label Jul 12, 2026
@nullsystem
nullsystem force-pushed the GH-1874_DmgReportRewrite branch from cb4d2d9 to 7914eb1 Compare July 13, 2026 19:21
@nullsystem nullsystem changed the title [DRAFT: RELIES ON #2017/GH-1947_KDHudReplace] Fix local player's players killed report not resetting each round [WIP] Fix local player's players killed report not resetting each round Jul 13, 2026
Two fixes: First m_bFirstAliveTick never gets updated when the player
respawns past the first respawn since not dying on a round will not
turn this to true and the respawn resets through m_bFirstAliveTick
for local player in PreThink doesn't get utilized. This may also
be the cause of other non-reset issues people seen before, but this
has affected the killed players report especially.

Second, move the array from C_NEO_Player into its own global array
as really it's only a single instance (for the local player) and
pointless for every single C_NEO_Player to hold it. For sanity
check, change from it being entity index array based to UserID
based to be sure which is which when its displayed and not affected
by entity index changes.

Killer info/scoreboard:

- Checking for pre-round freeze in killer_info no longer needed
  - Now the c_neo_player first tick alive got fixed, can just do it
    there.
- Use MAX_PLAYERS_ARRAY_SAFE
- Move local player check

* fixes NeotokyoRebuild#1874
@nullsystem
nullsystem force-pushed the GH-1874_DmgReportRewrite branch from 7914eb1 to 3cbdb97 Compare July 13, 2026 19:59
@nullsystem
nullsystem marked this pull request as ready for review July 13, 2026 20:01
@nullsystem nullsystem changed the title [WIP] Fix local player's players killed report not resetting each round Fix local player's players killed report not resetting each round Jul 13, 2026
@nullsystem
nullsystem requested a review from a team July 13, 2026 20:01
Comment thread src/game/client/neo/ui/neo_scoreboard.cpp Outdated
Comment thread src/game/client/neo/ui/neo_scoreboard.cpp Outdated
@sunmachine

sunmachine commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Would clearing on the round_start event instead of the first alive tick be cleaner here, since it also covers players who don't respawn (dead/spectating) at round changeover?

EDIT: It's defined in neo_gamerules.cpp:2954, and I think you'd need to register it at... neo_hud_deathnotice.cpp:208, CNEOHud_DeathNotice::Init.

@sunmachine sunmachine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is what I mean from my comment before. Feel free to explain why this isn't the way, but I think it'll avoid the edge-cases caused by waiting until the first alive tick.

Comment thread src/game/client/neo/ui/neo_hud_deathnotice.cpp
Comment thread src/game/client/neo/ui/neo_hud_deathnotice.cpp
Comment thread src/game/client/neo/ui/neo_hud_deathnotice.cpp
Comment thread src/game/client/neo/c_neo_player.cpp
Comment thread src/game/client/neo/c_neo_player.cpp
Comment thread src/game/client/neo/c_neo_player.cpp
@nullsystem

nullsystem commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

@sunmachine I think first alive tick also covers when players are allowed to respawn within the round (DM/TDM/JGR) which round_start won't, also the context of the report is for when the player's alive since the latest spawning in so first tick makes more sense.

@nullsystem
nullsystem requested a review from Masterkatze July 19, 2026 22:49
@nullsystem

Copy link
Copy Markdown
Collaborator Author

@Masterkatze Changes based on code review: 71703f8

@nullsystem
nullsystem requested a review from sunmachine July 19, 2026 22:52
@nullsystem
nullsystem merged commit 45dcf3f into NeotokyoRebuild:master Jul 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tournament Priority Issues to be prioritized for the upcoming NT;RE tournament

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants