saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2, written in C#.
MIT License
76 stars 7 forks source link

Silenced weapons are not showing up #38

Closed in0finite closed 5 months ago

in0finite commented 5 months ago

Research

Description

CCSPlayerPawn.ActiveWeapon?.ServerClass?.Name doesn't return silenced weapons (m4a1-s, usp-s), but returns their couterparts (m4a1, hkp2000).

Code to reproduce

No response

Affected demos

No response

saul commented 5 months ago

The server class is the name of the entity for these weapons. The entity is the same regardless of whether it's the silenced version or not. Can you instead try using:

CCSPlayerPawn.AttackerPawn?.ActiveWeapon?.AttributeManager.Item

This should give you the details you need