From 3bd48fb8c59aa3685080a107ef782feab191e25e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 22 Nov 2020 20:34:57 +0100 Subject: [PATCH] - Exhumed: Fixed CalcPosVel not initializing the vel parameter. This caused spurious errors in OpenAL if the passed values were NANs or INFs. Fixes #183 --- source/exhumed/src/sound.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/exhumed/src/sound.cpp b/source/exhumed/src/sound.cpp index 5990a9e3f..84ef80cdd 100644 --- a/source/exhumed/src/sound.cpp +++ b/source/exhumed/src/sound.cpp @@ -440,6 +440,8 @@ void EXSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], } auto fcampos = GetSoundPos(&campos); + if (vel) vel->Zero(); + if (type == SOURCE_Ambient) { *pos = *(FVector3*)source;