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

Grenades show wrong killerinfo weapon #596

Closed
1 of 2 tasks
Rainyan opened this issue Sep 17, 2024 · 7 comments · Fixed by #609
Closed
1 of 2 tasks

Grenades show wrong killerinfo weapon #596

Rainyan opened this issue Sep 17, 2024 · 7 comments · Fixed by #609
Assignees
Labels
Bug Report Bug Reports made through the "Report Issue" interface in GitHub.
Milestone

Comments

@Rainyan
Copy link
Collaborator

Rainyan commented Sep 17, 2024

Build Info

v8.0-prealpha (b2291c5)

Description

Grenade kills incorrectly display the attack weapon as the weapon currently held by the attacker, not the grenade itself.

To Reproduce

  • Join a local server as assault
  • Spawn in a bot
  • Set bot_mimic 1; bot_attack 0
  • Switch your gun to grenade, so the bot will also
  • Set bot_mimic 0, throw away your own grenade somewhere safe
  • Turn bot_mimic 1 on again
  • Make the bot net a grenade kill on you

Expected behavior

Killerinfo panel shows the name of the weapon currently held by the bot as the attack weapon, and not the grenade's name.

Actual behavior

Killerinfo panel shows the grenade's name as the attack weapon.

Operating System

  • Windows
  • Linux

Version/Distro

Mint 21.3 Cinnamon

Machine's CPU

No response

Machine's GPU

No response

GPU's driver

No response

Build's compiler

No response

Additional context and Screenshots

killerinfo.webm
@Rainyan Rainyan added the Bug Report Bug Reports made through the "Report Issue" interface in GitHub. label Sep 17, 2024
@AdamTadeusz
Copy link
Contributor

In the case of thrown projectiles like grenades the weapon used to spawn the grenade projectile is usually deleted by the time the projectile kills a player. In those cases the easiest value to return that would be meaningful to the person who died would be the class name of the projectile returned by GetInflictor()
image
Could also match the class name of the projectile to some expected values to make it look nicer than neo_grenade_frag for example

@AdamTadeusz
Copy link
Contributor

image

@xedmain
Copy link
Contributor

xedmain commented Sep 18, 2024

having it have the same names as in og nt for detpacks and frags will make porting some plugins easier (ex. killstreak sounds plugin uses them, as well as probably log parsers and neotokyo's hlstats:x)

@AdamTadeusz
Copy link
Contributor

you mean plugins can actually read this information in this box?
If so, do you know what the og nt name for detpacks and frags is?

@Rainyan
Copy link
Collaborator Author

Rainyan commented Sep 18, 2024

Plugins generally listen for the player_death event: https://wiki.alliedmods.net/Neotokyo_Events

It might be cleaner to implement this event with parity, if not done already, and use a client side listener for it. It would be what plugins like Killer info display use, and is presumably what we'd wanna emulate for the feature.

Although I should add, personally I don't like having this killerinfo thing as a built-in feature at all - IMO it should remain a SourceMod plugin.

edit: I see you already did a PR. Well, these were just some ramblings, maybe for a future round of refactoring.

@xedmain
Copy link
Contributor

xedmain commented Sep 18, 2024

you mean plugins can actually read this information in this box? If so, do you know what the og nt name for detpacks and frags is?

you can kill yourself
using a grenade or detpack on a server with killer info display and it'll show it. I'll be home only at 21:00 CEST unfortunately, but when I come I'll be able to look in the source code for killstreak plugin

@xedmain
Copy link
Contributor

xedmain commented Sep 20, 2024

frag grenade: grenade_projectile
detpack: grenade_detapack

@kassibuss kassibuss added this to the Parity milestone Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Bug Reports made through the "Report Issue" interface in GitHub.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants