Skip to content

Commit

Permalink
Merge pull request #560 from markus-wa/fix-nil-player
Browse files Browse the repository at this point in the history
  • Loading branch information
akiver authored Aug 8, 2024
2 parents 894aeb3 + ddb4ff4 commit 25f2b4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/demoinfocs/datatables.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ func (p *parser) bindNewPlayerControllerS2(controllerEntity st.Entity) {
pl := p.getOrCreatePlayerFromControllerEntity(controllerEntity)

controllerEntity.Property("m_iConnected").OnUpdate(func(val st.PropertyValue) {
pl := p.getOrCreatePlayerFromControllerEntity(controllerEntity)
state := val.S2UInt32()
wasConnected := pl.IsConnected
pl.IsConnected = state == 0
Expand Down

0 comments on commit 25f2b4e

Please sign in to comment.