Skip to content

Conversation

akiver
Copy link
Collaborator

@akiver akiver commented Jul 21, 2025

This fix all warnings about nil values in game events such as Kill, PlayerHurt... in the cs-demo-analyzer project.

this fix all warnings about nil values in game events such as Kill, PlayerHurt... in the cs-demo-analyzer project.
@akiver akiver marked this pull request as draft July 21, 2025 10:15
@akiver akiver marked this pull request as ready for review July 21, 2025 10:40
Comment on lines +473 to +477
if killer == nil && data["attacker_pawn"] != nil {
// CS2 only, fallback to pawn handle if the killer was not found by its user ID
killer = geh.parser.gameState.Participants().FindByPawnHandle(uint64(data["attacker_pawn"].GetValLong()))
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@akiver akiver requested a review from markus-wa July 21, 2025 10:40
@markus-wa markus-wa merged commit 0722cfc into master Jul 21, 2025
10 of 12 checks passed
@markus-wa markus-wa deleted the nil-fields branch July 21, 2025 11:44
@markus-wa
Copy link
Owner

LGTM, thx!

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.

2 participants