PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
39 stars 9 forks source link

Incorrect assignment of the drowning sound to the selected player model #121

Closed kai-li-wop closed 2 years ago

kai-li-wop commented 2 years ago

This issue seems to be part of WoP for a very long time and was recently reported by Ben The Padking:

"From what I can work out, if you are the first and only player on the server, you can drown and hear (the drowning sound of) whatever model you select. If you for example join the server again and then there are two (players) of you on it, you make the same drowning noise as the original player, no matter what you change to. For example, I changed to PADGiRL when I joined again (so there were 2 of me), but I was PADMAN when i joined the server. PADGiRL makes PADMAN's drowning noise."

Ben captured this video:

https://user-images.githubusercontent.com/44040989/150828616-9af86847-d7bb-4da0-b881-5d83840546d4.MP4

PADGiRLS drowning sound is a little short and not easy to hear while PADMAN is drowning and then saying "Damn, not my day". ;)

mgerhardy commented 2 years ago

The custom sounds are loaded in CG_LoadClientInfo and the problem is most likely in CG_SetDeferredClientInfo

mgerhardy commented 2 years ago

https://bugzilla.icculus.org/show_bug.cgi?id=2401

https://github.com/ioquake/ioq3/commit/69b81f2bd931053f335d2eda5fccb575187a3118

mgerhardy commented 2 years ago

here is the above mentioned commit for wop https://github.com/PadWorld-Entertainment/worldofpadman/commit/0e1b8affa688e7bf6a7f561572e42e6f03c238b3

3aTmE commented 2 years ago

I tried to replicate this Bug on Build 136 + the recent source / assets from the main branch.

What happend?

While playing with the Client that uses PadPlayer as Playermodel the other client which used PiratePad mimics all sounds from the first Client. When PadPlayer jumped i was also able to hear PiratePad jumping. When i drowned on the client that used PadPlayer the drowning sounds of PiratePad was also audible. Even when the second Player stood far away.

What i did:

Demonstrated with the Taunt Emote :

https://user-images.githubusercontent.com/84514074/158892224-e0c2a02d-c393-482e-903c-6725fb715e78.mp4

What was not tested yet?

kai-li-wop commented 2 years ago

@mgerhardy: After 0e1b8affa688e7bf6a7f561572e42e6f03c238b3 the issue is not resolved. I can recreate it in the current 1.7 dev. When I drown as Padman I can still hear PadGirls drown sound instead of Padmans drown sound. PadGirl has a very short drown sound, so it is not easy to recognize when Padman "says" his final words under water, which is curious. Maybe under water players should not comment their death anyway.

@3aTmE: I could also recreate your "new" issue, but I think it's a feature, not a bug. When I joined with the Padman client to the PadGirl client Padman was shown as PadGirl and also used all her sounds. After pressing TAB on both clients the issue resolved. As far as I have red from the code it is wanted. Loading a new model and assets can lead to a lag. @mgerhardy, correct me when I am wrong here.

See the picture. PadGirl standing there was me joining as Padman from another computer. After pressing TAB I appeared as Padman correctly. shot0000

3aTmE commented 2 years ago

@3aTmE: I could also recreate your "new" issue...

Yes, now coming back to it after i was able to get a good night of sleep : You're absolutely right! My "Issue" was simply caused by not pressing TAB on the second client.

I just forgot to press TAB on both. Sorry about that 😅

mgerhardy commented 2 years ago

play custom sound *drown for client 0 - this is invalid - should be client num 1 in my case.

mgerhardy commented 2 years ago
custom sound *death1 for client 1 (model: padman - name PadPlayer)
custom sound *death2 for client 1 (model: padman - name PadPlayer)
custom sound *death3 for client 1 (model: padman - name PadPlayer)
custom sound *jump1 for client 1 (model: padman - name PadPlayer)
custom sound *pain25_1 for client 1 (model: padman - name PadPlayer)
custom sound *pain50_1 for client 1 (model: padman - name PadPlayer)
custom sound *pain75_1 for client 1 (model: padman - name PadPlayer)
custom sound *pain100_1 for client 1 (model: padman - name PadPlayer)
custom sound *falling1 for client 1 (model: padman - name PadPlayer)
custom sound *gasp for client 1 (model: padman - name PadPlayer)
custom sound *drown for client 1 (model: padman - name PadPlayer)
custom sound *fall1 for client 1 (model: padman - name PadPlayer)
custom sound *taunt for client 1 (model: padman - name PadPlayer)
custom sound *hehe1 for client 1 (model: padman - name PadPlayer)
custom sound *hehe2 for client 1 (model: padman - name PadPlayer)
play custom sound *gasp for client 1 (model: padman - name PadPlayer)
play custom sound *death2 for client 1 (model: padman - name PadPlayer)
play custom sound *drown for client 0 (model: padgirl - name PadPlayer)

(last?) drown sound is always for clientnum 0 (padgirl wasn't even touching the water)

mgerhardy commented 2 years ago
    case EV_DEATH1:
    case EV_DEATH2:
    case EV_DEATH3:
        // TODO: temporary disabled - see https://github.com/PadWorld-Entertainment/worldofpadman/issues/36
        // missing sounds in wop - once we have them - we should activate this.
        if (0 && CG_WaterLevel(cent) == WL_DIVING) {
            trap_S_StartSound(NULL, es->number, CHAN_VOICE, CG_CustomSound(es->number, "*drown"));
        } else {
            trap_S_StartSound(NULL, es->number, CHAN_VOICE,
                              CG_CustomSound(es->number, va("*death%i", event - EV_DEATH1 + 1)));
        }
        break;

See issue #72

mgerhardy commented 2 years ago

I think this should be fixed now.

3aTmE commented 2 years ago

I think this should be fixed now.

I can confirm the fix. Was not able to recreate this issue with the Current Codebase on a local Game.