Fix local player's players killed report not resetting each round#2018
Conversation
cb4d2d9 to
7914eb1
Compare
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
7914eb1 to
3cbdb97
Compare
|
Would clearing on the EDIT: It's defined in |
There was a problem hiding this comment.
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.
|
@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. |
|
@Masterkatze Changes based on code review: 71703f8 |
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:
there.
Toolchain
Linked Issues