Page MenuHomeFeedback Tracker

SetExplicitVolumeFactor_EnvSounds2D affects all players despite GetGame().IsClient() check.
Assigned, UrgentPublic

Description

Hello, i'm trying to achieve changing sounds for specific player, for example if he's inside some trigger. But there is a problem even if there is a client check - SetExplicitVolumeFactor_EnvSounds2D applies for everyone near player. So it's not clear on which radius it applies, and it will be very useful if we can control SetExplicitVolumeFactor_EnvSounds2D for each player.

Not sure if it's bug or by design.

Also it applies to players even if player which activated SetExplicitVolumeFactor_EnvSounds2D comes in ~1000m range to another player.

If both players already applied SetExplicitVolumeFactor_EnvSounds2D and then comes to each other on distance ~1060m, SetExplicitVolumeFactor_EnvSounds2D values got swapped for this players...

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
General
Steps To Reproduce

In my case i'm trying to control environment sound for player when he wears headphones.
Code to reproduce:

	override void OnWasAttached( EntityAI parent, int slot_id )
	{
        if (GetGame().IsClient()) {
			GetGame().GetWorld().SetExplicitVolumeFactor_EnvSounds2D(0.1, 1);
		}
		super.OnWasAttached( parent, slot_id );
	}

just do it in 1000m radius to another player, or do it and then come to player. SetExplicitVolumeFactor_EnvSounds2D - will be applied to him also.

Event Timeline

onemantooo updated the task description. (Show Details)Jul 24 2023, 4:41 PM
onemantooo edited Steps To Reproduce. (Show Details)
onemantooo updated the task description. (Show Details)Jul 24 2023, 4:48 PM
onemantooo updated the task description. (Show Details)

If this behavior is intentional - please add additional optional argument, like local = false to apply it only for specific player.

GetGame().GetWorld().SetExplicitVolumeFactor_EnvSounds2D(0.1, 1, true);

Geez changed the task status from New to Assigned.Jul 25 2023, 11:26 AM
onemantooo changed Severity from Feature to Major.Aug 1 2023, 12:07 AM

@Geez any news on this?