Open Rainyan opened 1 week ago
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() Could also match the class name of the projectile to some expected values to make it look nicer than neo_grenade_frag for example
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)
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?
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.
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
frag grenade: grenade_projectile
detpack: grenade_detapack
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
bot_mimic 1; bot_attack 0
bot_mimic 0
, throw away your own grenade somewhere safebot_mimic 1
on againExpected 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
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