diff --git a/neo/idlib/Lib.cpp b/neo/idlib/Lib.cpp index 515e819f..026a7081 100644 --- a/neo/idlib/Lib.cpp +++ b/neo/idlib/Lib.cpp @@ -540,6 +540,10 @@ void AssertFailed( const char *file, int line, const char *expression ) { #ifdef _MSC_VER __debugbreak(); _exit(1); +#elif defined(__clang__) + // More appropriate than __builtin_trap, indeed it does trigger SIGILL + // but SIGTRAP instead. only clang supports for now (so far). + __builtin_debugtrap(); #elif defined(__unix__) // __builtin_trap() causes an illegal instruction which is kinda ugly. // especially if you'd like to be able to continue after the assertion during debugging diff --git a/neo/sound/snd_emitter.cpp b/neo/sound/snd_emitter.cpp index bd241b81..3b166e68 100644 --- a/neo/sound/snd_emitter.cpp +++ b/neo/sound/snd_emitter.cpp @@ -1148,9 +1148,8 @@ idSlowChannel::Reset =================== */ void idSlowChannel::Reset() { - memset( this, 0, sizeof( *this ) ); - - this->chan = chan; + active = false; + chan = nullptr; curPosition.Set( 0 ); newPosition.Set( 0 ); @@ -1158,6 +1157,7 @@ void idSlowChannel::Reset() { curSampleOffset = -10000; newSampleOffset = -10000; + playbackState = 0; triggerOffset = 0; }