Skip to content

Commit

Permalink
fix: weapon may be incorrect in kill events
Browse files Browse the repository at this point in the history
  • Loading branch information
akiver committed Dec 29, 2023
1 parent d0cce14 commit baf70bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/demoinfocs/common/equipment.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,12 @@ func MapEquipment(eqName string) EquipmentType {
wep = EqKnife
} else {
// If the eqName isn't known it will be EqUnknown as that is the default value for EquipmentType
wep = eqNameToWeapon[eqName]
for name := range eqNameToWeapon {
if strings.HasPrefix(eqName, name) {
wep = eqNameToWeapon[name]
break
}
}
}

return wep
Expand Down

0 comments on commit baf70bc

Please sign in to comment.