From f9448c3b42116cdfec08efa2daf97e85e91d79af Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 6 Feb 2024 10:59:55 +0100 Subject: [PATCH] Skip calling `SetTime` api if start time is unused #2203 --- Source/Engine/Audio/AudioSource.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Audio/AudioSource.cpp b/Source/Engine/Audio/AudioSource.cpp index a474ec0c7..89d1d0a5b 100644 --- a/Source/Engine/Audio/AudioSource.cpp +++ b/Source/Engine/Audio/AudioSource.cpp @@ -546,8 +546,9 @@ void AudioSource::BeginPlay(SceneBeginData* data) #if USE_EDITOR if (Time::GetGamePaused()) return; -#endif +#endif Play(); - SetTime(GetStartTime()); + if (GetStartTime() > 0) + SetTime(GetStartTime()); } }