Skip to content

Commit a4106dc

Browse files
committed
datatables cs2: update equipment owner
1 parent aa1b925 commit a4106dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/demoinfocs/datatables.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ func (p *parser) bindWeaponS2(entity st.Entity) {
951951
entity.Property("m_hOwnerEntity").OnUpdate(func(val st.PropertyValue) {
952952
weaponOwner := p.GameState().Participants().FindByPawnHandle(val.Handle())
953953
if weaponOwner == nil {
954+
equipment.Owner = nil
954955
return
955956
}
956957

@@ -974,6 +975,7 @@ func (p *parser) bindWeaponS2(entity st.Entity) {
974975
}
975976

976977
lastMoneyIncreased = false
978+
equipment.Owner = nil
977979
delete(p.gameState.weapons, entityID)
978980
})
979981

0 commit comments

Comments
 (0)