Skip to content

Commit

Permalink
feat: dispatch PlayerDisconnected event
Browse files Browse the repository at this point in the history
  • Loading branch information
akiver committed Dec 29, 2023
1 parent 3e64ab0 commit 3c8f602
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 @@ -517,6 +517,7 @@ func (p *parser) bindNewPlayerControllerS2(controllerEntity st.Entity) {
controllerEntity.Property("m_hPawn").OnUpdate(func(val st.PropertyValue) {
if val.Handle() == constants.InvalidEntityHandleSource2 {
pl.IsConnected = false
p.eventDispatcher.Dispatch(events.PlayerDisconnected{Player: pl})
}
})

Expand Down

0 comments on commit 3c8f602

Please sign in to comment.