Open JuhaKiili opened 3 months ago
unknown grenade model can likely be ignored for now (but of course I want to fix it at some point)
the UNKNOWN inventory entries are a bigger problem and it will probably take some time to get this fixed pproperly.
In the meantime you might want to do something like this to get the weapon as fallback:
for id, eq := range pl.Inventory {
if eq.Type == EqUnknown {
eq.Type = map[string]common.EquipmentType{
"CFlashbang": common.EqFlash,
"CIncendiaryGrenade": common.EqIncendiary,
"CSmokeGrenade": common.EqSmoke,
"CHEGrenade": common.EqHE,
"CMolotovGrenade": common.EqMolotov,
"CWeaponMAC10": common.EqMac10,
"CWeaponTec9": common.EqTec9,
"CWeaponGalilAR": common.EqGalil,
"CWeaponTaser": common.EqZeus,
"CWeaponElite": common.EqDualBerettas,
}[parser.GameState().Weapons[id].ServerClass().Name()]
}
}
Describe the bug Player inventories contain items marked as
UNKNOWN
Parsing prints outunknown grenade model 7715198341845107231
Maybe related or two separate issues. This happens for POV demos.To Reproduce Use the code below
go run test.go -demo /path/to/demo.dem
https://cs2-pov-demos.s3.eu-west-1.amazonaws.com/cs2-pov-demo-missing-inventory-1.dem https://cs2-pov-demos.s3.eu-west-1.amazonaws.com/cs2-pov-demo-missing-inventory-2.demCode:
Current behavior
Expected behavior I expect all inventory items to be known utility or weapons I don't expect to see
unknown grenade model 7715198341845107231
errorsLibrary version v4.1.2