Skip to content

Commit

Permalink
Merge pull request #497 from markus-wa/disconnect-bots
Browse files Browse the repository at this point in the history
fix: set player connected flag to false when controller is destroyed
  • Loading branch information
markus-wa authored Jan 21, 2024
2 parents d812f4a + 30541c4 commit 88ff690
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 @@ -526,6 +526,7 @@ func (p *parser) bindNewPlayerControllerS2(controllerEntity st.Entity) {
})

controllerEntity.OnDestroy(func() {
pl.IsConnected = false
delete(p.gameState.playersByEntityID, controllerEntity.ID())
})
}
Expand Down

0 comments on commit 88ff690

Please sign in to comment.