Made a basic weapon API, fixed SetPlayerAlpha function, moved logging to its own file (had to be done now, it was hard to find before), made a separate cvar to disable logging fully.

This commit is contained in:
Greyscale
2009-04-20 05:43:20 +02:00
parent 41153af5f4
commit 7111a8c594
17 changed files with 377 additions and 243 deletions

View File

@ -695,18 +695,18 @@ ClassGetDefaultSpawnClass(teamid, cachetype = ZR_CLASS_CACHE_MODIFIED)
// in the specified team, and log a warning.
classindex = ClassGetFirstClass(teamid, _, cachetype);
if (LogFlagCheck(LOG_CORE_EVENTS, LOG_MODULE_CLASSES))
if (LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_CLASSES))
{
ZR_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);
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);
}
// Validate the new index.
if (ClassValidateIndex(classindex))
{
// Log a warning.
if (LogFlagCheck(LOG_CORE_EVENTS, LOG_MODULE_CLASSES))
if (LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_CLASSES))
{
ZR_LogMessageFormatted(-1, "Classes", "DefaultSpawnClass", "Warning: The default class name \"%s\" does not exist or matches the team ID.", _, classname);
LogMessageFormatted(-1, "Classes", "DefaultSpawnClass", "Warning: The default class name \"%s\" does not exist or matches the team ID.", _, classname);
}
return classindex;