View Single Post
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-26-2020 , 18:11   Re: [L4D2] Melee Range (1.5) [24-Sep-2020]
Reply With Quote #7

Quote:
Originally Posted by PEK727 View Post
I've noticed an issue with all melee weapons. When you attack farther than the default melee range value it fails to play their respective hit sounds.
Thanks, will fix and add them eventually.

Edit: not sure how to go about this. Using games default range "70" the function sometimes says it hit when it didn't. Seems to emit sound but nothing can heard (using sound hook to check). The function doesn't return what's been hit and hooking every entity to detect seems overkill for what it's worth. The hit sound range is determined by the "melee_range" cvar so for example setting to 1000 will emit sound when hitting something far away even if the weapons range has been changed to 100 for example. Without being able to determine what's been hit or how far away, I cannot check if the sound should be emitted or not. Blocking the actual sound being emitted and re-emitting could work, but the hit world and hit flesh happen at different frames and somehow the game determines if the flesh or world sound should play and in this case you hear both world and flesh sound.
__________________

Last edited by Silvers; 09-26-2020 at 19:54.
Silvers is offline