Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM_PlayWaterSounds bugged... #1028

Open
teddiboy opened this issue Nov 21, 2024 · 1 comment
Open

PM_PlayWaterSounds bugged... #1028

teddiboy opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
Engine: ⚙️ Independent Case do not refer to any Engine. OS: 💻 Independent Case do not refer to any OS. Priority: ⚠️ medium Medium priority tasks that should be addressed soon. Status: 🖐 available Task currently opened. Type: 💡 feature request Request for a new feature or enhancement.

Comments

@teddiboy
Copy link

👉👈 Contact Details (optional)

No response

💡 Tell us more about your idea

I tested with mp_footsteps 0 and it mutes players footsteps and water on the server, but it doesn't mute the water sound for me (client) pl_wade1/2/3/4.wav . Any idea ?

void PM_PlayWaterSounds()

void PM_PlayWaterSounds()
{
       // Added this thing by me
        if (pmove->multiplayer && !pmove->movevars->footsteps)
		return;

	// Did we enter or leave water?
	if (pmove->oldwaterlevel != 0)
	{
		if (pmove->waterlevel != 0)
			return;
	}
	else
	{
		if (pmove->waterlevel == 0)
			return;
	}

	switch (pmove->RandomLong(0, 3))
	{
	case 0: pmove->PM_PlaySound(CHAN_BODY, "player/pl_wade1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); break;
	case 1: pmove->PM_PlaySound(CHAN_BODY, "player/pl_wade2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); break;
	case 2: pmove->PM_PlaySound(CHAN_BODY, "player/pl_wade3.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); break;
	case 3: pmove->PM_PlaySound(CHAN_BODY, "player/pl_wade4.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); break;
	}
}
@teddiboy teddiboy added Engine: ⚙️ Independent Case do not refer to any Engine. OS: 💻 Independent Case do not refer to any OS. Priority: ⚠️ medium Medium priority tasks that should be addressed soon. Status: 🖐 available Task currently opened. Type: 💡 feature request Request for a new feature or enhancement. labels Nov 21, 2024
@Garey27
Copy link

Garey27 commented Dec 2, 2024

Because Player Move code (pm_*) is simulated by client code (in client.dll) and server's one in regamedll...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engine: ⚙️ Independent Case do not refer to any Engine. OS: 💻 Independent Case do not refer to any OS. Priority: ⚠️ medium Medium priority tasks that should be addressed soon. Status: 🖐 available Task currently opened. Type: 💡 feature request Request for a new feature or enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants