Began adding cvar descriptions, recoded logging module, fixed zmenu display bug, removed include line for anticamp until recoded.

This commit is contained in:
Greyscale
2009-05-14 09:32:01 +02:00
parent ef5dd66890
commit 055e89d64a
29 changed files with 588 additions and 811 deletions

View File

@ -674,9 +674,6 @@ ClassGetDefaultSpawnClass(teamid, cachetype = ZR_CLASS_CACHE_MODIFIED)
decl String:classname[64];
new classindex;
// Initialize log boolean.
new bool:enablelog = LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_CLASSES);
// Get the default class name from the correct CVAR depending on teamid.
switch (teamid)
{
@ -740,20 +737,13 @@ ClassGetDefaultSpawnClass(teamid, cachetype = ZR_CLASS_CACHE_MODIFIED)
// in the specified team, and log a warning.
classindex = ClassGetFirstClass(teamid, _, cachetype);
if (enablelog)
{
LogMessageFormatted(-1, "Classes", "DefaultSpawnClass", "Warning: Failed to set \"%s\" as default spawn class for team %d. The class doesn't exist or the team IDs doesn't match. Falling back to the first class in the team.", _, classname, teamid);
}
LogPrintToLog(LOG_FORMAT_TYPE_NORMAL, "Classes", "Default Spawn Class", "Warning: Failed to set \"%s\" as default spawn class for team %d. The class doesn't exist or the team IDs doesn't match. Falling back to the first class in the team.", classname, teamid);
// Validate the new index.
if (ClassValidateIndex(classindex))
{
// Log a warning.
if (enablelog)
{
LogMessageFormatted(-1, "Classes", "DefaultSpawnClass", "Warning: The default class name \"%s\" does not exist or matches the team ID.", _, classname);
}
LogPrintToLog(LOG_FORMAT_TYPE_NORMAL, "Classes", "Default Spawn Class", "Warning: The default class name \"%s\" does not exist or matches the team ID.", classname);
return classindex;
}
else