We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c73556 commit 06fee1cCopy full SHA for 06fee1c
pkg/demoinfocs/game_events.go
@@ -668,6 +668,14 @@ func (geh gameEventHandler) playerTeam(data map[string]*msg.CSVCMsg_GameEventKey
668
669
if player != nil {
670
if player.Team != newTeam {
671
+ if geh.parser.isSource2() {
672
+ // The "team" field may be incorrect with CS2 demos.
673
+ // As the prop m_iTeamNum (bound to player.Team) is updated before the game-event is fired we can force
674
+ // the correct team here.
675
+ // https://github.com/markus-wa/demoinfocs-golang/issues/494
676
+ newTeam = player.Team
677
+ }
678
+
679
player.Team = newTeam
680
}
681
0 commit comments