Skip to content

Commit

Permalink
Merge pull request #473 from micvbang/micvbang/weapon-owner
Browse files Browse the repository at this point in the history
datatables cs2: update equipment owner
  • Loading branch information
markus-wa authored Nov 16, 2023
2 parents d8e1150 + e3feeed commit 94ad2da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/demoinfocs/datatables.go
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ func (p *parser) bindWeaponS2(entity st.Entity) {
entity.Property("m_hOwnerEntity").OnUpdate(func(val st.PropertyValue) {
weaponOwner := p.GameState().Participants().FindByPawnHandle(val.Handle())
if weaponOwner == nil {
equipment.Owner = nil
return
}

Expand All @@ -1010,6 +1011,7 @@ func (p *parser) bindWeaponS2(entity st.Entity) {
}

lastMoneyIncreased = false
equipment.Owner = nil
delete(p.gameState.weapons, entityID)
})

Expand Down

0 comments on commit 94ad2da

Please sign in to comment.