Fixed bug in ambience that disabled sound being added to download table if logging was disabled.

This commit is contained in:
Greyscale 2009-05-07 03:06:08 +02:00
parent 3fb7163fb5
commit f0a975b431

View File

@ -57,12 +57,6 @@ bool:AmbientSoundsValidateConfig()
return false; 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. // Get ambient sound file.
decl String:sound[SOUND_MAX_PATH]; decl String:sound[SOUND_MAX_PATH];
GetConVarString(g_hCvarsList[CVAR_AMBIENTSOUNDS_FILE], sound, sizeof(sound)); GetConVarString(g_hCvarsList[CVAR_AMBIENTSOUNDS_FILE], sound, sizeof(sound));
@ -72,7 +66,11 @@ bool:AmbientSoundsValidateConfig()
if (!FileExists(sound, true)) if (!FileExists(sound, true))
{ {
// Log invalid sound file error. // Log invalid sound file 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); LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Invalid sound file specified in zr_ambientsounds_file.", LOG_FORMAT_TYPE_ERROR);
}
return false; return false;
} }
@ -81,7 +79,11 @@ bool:AmbientSoundsValidateConfig()
if (ambientvolume <= 0.0) if (ambientvolume <= 0.0)
{ {
// Log invalid ambient sound volume error. // Log invalid ambient sound volume 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); LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound is either muted or invalid.", LOG_FORMAT_TYPE_ERROR);
}
return false; return false;
} }
@ -90,7 +92,11 @@ bool:AmbientSoundsValidateConfig()
if (ambientlength <= 0.0) if (ambientlength <= 0.0)
{ {
// Log invalid ambient sound length error. // Log invalid ambient sound length error.
if (LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_AMBIENTSOUNDS))
{
LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound length is invalid.", LOG_FORMAT_TYPE_ERROR); LogMessageFormatted(-1, "Ambient Sounds", "Config Validation", "Ambient sound length is invalid.", LOG_FORMAT_TYPE_ERROR);
}
return false; return false;
} }