saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
111 stars 10 forks source link

Silenced weapons are not showing up #38

Closed in0finite closed 9 months ago

in0finite commented 9 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 9 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