From 3240589cec12072e5173b06599381731db750823 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sun, 18 Nov 2018 19:12:43 +0100 Subject: [PATCH] idProjectile::Launch() warns about missing snd_tracer --- game/Projectile.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game/Projectile.cpp b/game/Projectile.cpp index aafe6b4..51cddc0 100644 --- a/game/Projectile.cpp +++ b/game/Projectile.cpp @@ -462,7 +462,9 @@ void idProjectile::Launch( const idVec3 &start, const idVec3 &dir, const idVec3 if ( spawnArgs.GetBool( "tracers" ) ) { if( !damageDict->GetString( "snd_tracer", "", sound ) ){ - spawnArgs.GetString( "snd_tracer", "", sound ); + if(!spawnArgs.GetString( "snd_tracer", "", sound )) { + gameLocal.Warning("%s doesn't have snd_tracer set (neither in spawnArgs nor in damageDict)!", spawnArgs.GetString("classname", "")); + } } #ifdef _DENTONMOD if( spawnArgs.GetBool( "launchFromBarrel") ) { @@ -486,7 +488,8 @@ void idProjectile::Launch( const idVec3 &start, const idVec3 &dir, const idVec3 } } - StartSoundShader(declManager->FindSound( sound ), SND_CHANNEL_BODY, 0, false, NULL ); + if(sound[0] != '\0') + StartSoundShader(declManager->FindSound( sound ), SND_CHANNEL_BODY, 0, false, NULL ); //StartSoundShader( declManager->FindSound( sound ), SND_CHANNEL_BODY, 0, false, NULL );