Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapon is different #9

Open
researchersec opened this issue Sep 5, 2023 · 3 comments
Open

Weapon is different #9

researchersec opened this issue Sep 5, 2023 · 3 comments

Comments

@researchersec
Copy link

researchersec commented Sep 5, 2023

Is the weapon_fire weapon not passed through your maps dict?

weapon_fire

df = parser.parse_event("weapon_fire")
df["weapon"]
0       weapon_m4a1_silencer
1          weapon_knife_flip
2          weapon_knife_flip
3       weapon_m4a1_silencer
4              weapon_deagle
                ...         
5723             weapon_ak47
5724              weapon_awp
5725             weapon_ak47
5726             weapon_ak47
5727             weapon_ak47
Name: weapon, Length: 5728, dtype: object

player_death

df = parser.parse_event("player_death")
df["weapon"]
0         m4a1
1         m4a1
2      hkp2000
3         ak47
4         ak47
        ...   
250        awp
251       ak47
252        awp
253       ak47
254      world
Name: weapon, Length: 255, dtype: object

Best regards

@LaihoE
Copy link
Owner

LaihoE commented Sep 5, 2023

The output from parse_event is the real "raw" game event. These come from the demo and I don't touch either one. Why the weapons have different names in different events idk.

Of course the library could step in and do some post-processing of the events (not just these, but similar stuff with other events). How much of this should be done I haven't decided yet. Let's keep this issue open for now if others want to comment on this.

@researchersec
Copy link
Author

researchersec commented Sep 5, 2023

The player_death weapons are changed by this right?

pub static WEAPINDICIES: phf::Map<u32, &'static str> = phf_map! {
    1_u32 => "deagle",
    2_u32 => "elite",
    3_u32 => "fiveseven",
    4_u32 => "glock",
    7_u32 => "ak47",
    8_u32 => "aug",
    9_u32 => "awp",
    10_u32=> "famas",
    11_u32 => "g3sg1",
    13_u32 => "galilar",
    14_u32 => "m249",
    16_u32 => "m4a1",
    17_u32 => "mac10",
    19_u32 => "p90",
    20_u32 => "zone_repulsor",
    23_u32 => "mp5sd",
    24_u32 => "ump45",
    25_u32 => "xm1014",
    26_u32 => "bizon",
    27_u32 => "mag7",
    28_u32 => "negev",

@LaihoE
Copy link
Owner

LaihoE commented Sep 5, 2023

nope :/. Those are used for the "active_weapon_name" prop, and are not related to the events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants