Fixed bug in ambience that disabled sound being added to download table if logging was disabled.
This commit is contained in:
parent
3fb7163fb5
commit
f0a975b431
@ -57,12 +57,6 @@ bool:AmbientSoundsValidateConfig()
|
||||
return false;
|
||||
}
|
||||
|
||||
// If logging is disabled for ambient sounds, then stop.
|
||||
if (!LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_AMBIENTSOUNDS))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get ambient sound file.
|
||||
decl String:sound[SOUND_MAX_PATH];
|
||||
GetConVarString(g_hCvarsList[CVAR_AMBIENTSOUNDS_FILE], sound, sizeof(sound));
|
||||
@ -72,7 +66,11 @@ bool:AmbientSoundsValidateConfig()
|
||||
if (!FileExists(sound, true))
|
||||
{
|
||||
// Log invalid sound file error.
|
||||
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Invalid sound file specified in zr_ambientsounds_file.", LOG_FORMAT_TYPE_ERROR);
|
||||
if (LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_AMBIENTSOUNDS))
|
||||
{
|
||||
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Invalid sound file specified in zr_ambientsounds_file.", LOG_FORMAT_TYPE_ERROR);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -81,7 +79,11 @@ bool:AmbientSoundsValidateConfig()
|
||||
if (ambientvolume <= 0.0)
|
||||
{
|
||||
// Log invalid ambient sound volume error.
|
||||
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound is either muted or invalid.", LOG_FORMAT_TYPE_ERROR);
|
||||
if (LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_AMBIENTSOUNDS))
|
||||
{
|
||||
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound is either muted or invalid.", LOG_FORMAT_TYPE_ERROR);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -90,7 +92,11 @@ bool:AmbientSoundsValidateConfig()
|
||||
if (ambientlength <= 0.0)
|
||||
{
|
||||
// Log invalid ambient sound length error.
|
||||
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound length is invalid.", LOG_FORMAT_TYPE_ERROR);
|
||||
if (LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_AMBIENTSOUNDS))
|
||||
{
|
||||
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound length is invalid.", LOG_FORMAT_TYPE_ERROR);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user