HDest-Community / Ugly-as-Sin

Enhancement modules for Hideous Destructor
zlib License
21 stars 17 forks source link

Traumakit: Use PlayerPawn's PlaySkinSound, play skin sounds on patient #151

Closed ghost closed 3 years ago

caligari87 commented 3 years ago

@nicothegoat Hey just a heads-up, it turns out PlaySkinSound is actually A_PlaySkinSound and is a function of HDWeapon, not HDPlayer, so I ended up needing to do some finagling to make this work.

https://github.com/caligari87/Ugly-as-Sin/blob/cd51983ab7c41bcbc7c212e135f2ffd33541e5c8/modules/items/traumakit/traumakit_pain.zsc#L2-L5

ghost commented 3 years ago

PlaySkinSound is an HDPlayerPawn method - i specifically moved it there so that the trauma kit's non-action edit of A_PlaySkinSound wasn't necessary. Though I did just notice that putting it on HDPlayerPawn kinda misses the point of A_PlaySkinSound, as once you have an HDPlayerPawn reference, you can just get the skin sounds directly and call A_StartSound yourself.