Page 1 of 2

Quakesounds

Posted: Tue May 26, 2020 3:45 pm
by cssbestrpg

Re: Quakesounds

Posted: Tue May 26, 2020 3:49 pm
by Sam
Tip: soundlib -> engines.sound.Sound

Re: Quakesounds

Posted: Tue May 26, 2020 7:31 pm
by Painkiller
Nice to see that there are now also some for SP.

High praise

little things I noticed:

Headshot, Teamkill for teamdeathmatch, Multikill ,humiliation, suizide are things that are very interesting but unfortunately missing.

Maybe you still have the desire to add to this.

Greeting Painkiller

Re: Quakesounds

Posted: Tue May 26, 2020 7:35 pm
by cssbestrpg
Some point i could add missing sounds

So far now:

Added now humiliation sound when knife kill
Added multikill sound
Added headshot sound

Re: Quakesounds

Posted: Wed May 27, 2020 7:28 am
by Painkiller
I will test it in the next days on a separate server and let you know.

Re: Quakesounds

Posted: Wed May 27, 2020 3:56 pm
by Painkiller
Hello mate, a friend tested the plugin and this is the first bug he noticed.

Code: Select all

2020-05-27 10:11:19 - sp   -   MESSAGE   [SP] Successfully loaded plugin 'quakesound'.
2020-05-27 10:14:14 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\events\listener.py", line 92, in fire_game_event
    callback(game_event)
  File "..\addons\source-python\plugins\quakesound\quakesound.py", line 61, in player_death
    if int(args['headshot']):


Code: Select all

2020-05-27 10:15:16 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\events\listener.py", line 92, in fire_game_event
    callback(game_event)
  File "..\addons\source-python\plugins\quakesound\quakesound.py", line 61, in player_death
    if int(args['headshot']):

KeyError: "Key 'headshot' does not exist."

Re: Quakesounds

Posted: Wed May 27, 2020 4:29 pm
by cssbestrpg
Can he test now? i made possible fix for headshot

Re: Quakesounds

Posted: Thu May 28, 2020 7:47 am
by Painkiller
This come now.

Re: Quakesounds

Posted: Thu May 28, 2020 10:38 am
by Ayuto
cssbestrpg wrote:Can he test now? i made possible fix for headshot

This won't really fix the issue in HL2DM. It now just uses a default value (0) if the key "headshot" wasn't found (HL2DM doesn't provide a headshot key in the event player_death). You need to check the player's last hitgroup:

Syntax: Select all

from events import Event
from players.entity import Player
from players.constants import HitGroup

@Event('player_death')
def on_player_death(event):
player = Player.from_userid(event['userid'])
if player.last_hitgroup == HitGroup.HEAD:
# Your code...
print('Headshot')

Re: Quakesounds

Posted: Thu May 28, 2020 11:01 am
by cssbestrpg
Now updated the code, thanks Ayuto, i didn't know was HL2DM, i did make the code for css orginaly

Re: Quakesounds

Posted: Thu May 28, 2020 7:02 pm
by Painkiller
Thanks a lot it will be tested again.

It is always nice to have quake sounds for several games and not just for one specific game.

Code: Select all

2020-05-28 14:24:18 - sp   -   MESSAGE   [SP] Loading plugin 'quakesound'...
2020-05-28 14:24:18 - sp   -   WARNING   
[SP] Encountered a Warning:
  File '..\addons\source-python\packages\site-packages\path.py', line 1713: DeprecationWarning
    path is deprecated. Use Path instead.

2020-05-28 14:24:18 - sp   -   MESSAGE   [SP] Successfully loaded plugin 'quakesound'.

Re: Quakesounds

Posted: Thu May 28, 2020 7:45 pm
by cssbestrpg
The warning error can ignore, did the all sounds work? specially the headshot one?

Re: Quakesounds

Posted: Thu May 28, 2020 10:08 pm
by Painkiller
My mate, says no sound plays.

Re: Quakesounds

Posted: Thu May 28, 2020 11:25 pm
by L'In20Cible
There is a missing = on this line: ../quakesound.py#L74

Re: Quakesounds

Posted: Fri May 29, 2020 8:21 am
by cssbestrpg
Fixed now missing =

Re: Quakesounds

Posted: Fri May 29, 2020 9:35 am
by Ayuto
I guess I worked too much with another language lately (I also used the pipe (|) as a comment...) :rolleyes:

Re: Quakesounds

Posted: Fri May 29, 2020 4:36 pm
by Painkiller
Works now.

Re: Quakesounds

Posted: Fri Dec 18, 2020 9:13 am
by cssbestrpg
Added now suicide sound

Re: Quakesounds

Posted: Tue Dec 22, 2020 10:15 pm
by daren adler
I get this

Code: Select all

2020-12-22 16:12:13 - sp   -   MESSAGE   [SP] Loading plugin 'quakesound'...
2020-12-22 16:12:13 - sp   -   WARNING   
[SP] Encountered a Warning:
  File '..\addons\source-python\packages\site-packages\path.py', line 1713: DeprecationWarning
    path is deprecated. Use Path instead


It dont crash,,i just seen it while cleaning up.

Re: Quakesounds

Posted: Tue Dec 22, 2020 11:52 pm
by satoon101
That's just a warning, so nothing to be concerned about. The plugin can be updated to use path.Path instead of path.path to fix that warning. In future versions of the path package, they did remove path.path. I'm not sure if/when we'll update the SP version of that package, but if/when we do, it will break any plugins that use path.path.