From 710d46fabf1e7b083dac8431cd802e9f041fd82d Mon Sep 17 00:00:00 2001 From: VR Lab 4 <account@vr.rwth-aachen.de> Date: Wed, 19 Jul 2023 13:01:53 +0200 Subject: [PATCH] make directivity handling more robust --- .../Private/SoundSource/VAAbstractSourceComponent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp b/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp index a2c68f8..f6cf224 100644 --- a/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp +++ b/Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp @@ -489,11 +489,19 @@ bool UVAAbstractSourceComponent::SetDirectivityByFileName(const FString FileName bool UVAAbstractSourceComponent::SetDefaultDirectivity() { + if (!ShouldSendCommand()) + { + return false; + } return SoundSource->SetDirectivity(FVADirectivityManager::GetDefaultDirectivity()); } bool UVAAbstractSourceComponent::SetNoDirectivity() { + if (!ShouldSendCommand()) + { + return false; + } return SoundSource->RemoveDirectivity(); } -- GitLab