From d6b17c0406d1574f2d67f3f431a00af5dec8bb25 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Mar 2020 09:18:23 +0100 Subject: [PATCH] - fixed bad vector comparison in SW's sound code. --- source/common/utility/vectors.h | 2 ++ source/sw/src/sounds.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/common/utility/vectors.h b/source/common/utility/vectors.h index f9f84421a..1dafe2d88 100644 --- a/source/common/utility/vectors.h +++ b/source/common/utility/vectors.h @@ -312,6 +312,8 @@ struct TVector3 { } + TVector3(nullptr_t) = delete; + TVector3(const TVector3 &other) = default; TVector3 (const Vector2 &xy, vec_t z) diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 72c450316..1268dad30 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -563,7 +563,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], } - if ((chanflags & CHANF_LISTENERZ) && campos != nullptr && type != SOURCE_None) + if ((chanflags & CHANF_LISTENERZ) && type != SOURCE_None) { pos->Y = campos.Y; }