New log features, class attribute and minior changes. See details.
Made new log CVAR for overriding filters on error log types: zr_log_error_override. If this is on, errors are always logged, independent of flags and filters. Now all non-error logging can be completely disabled without complex flags or filtering. Made new class attribute ("has_napalm", ClassGetHasNapalm) that specifies if the class have or can trhow napalm grenades. Implemented usage in napalm module. Added team id validation in class attributes. Improved formatting of log messages in cvars module. Known issue: Commands in config for adding modules to log filter are executed too late. Otherwise the module filter works fine.
This commit is contained in:
@ -461,6 +461,38 @@ stock ClassGetFOV(index, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
* ------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the napalm setting from the specified class.
|
||||
*
|
||||
* @param index Index of the class in a class cache or a client index,
|
||||
* depending on the cache type specified.
|
||||
* @param cachetype Optional. Specifies what class cache to read from. Options:
|
||||
* ZR_CLASS_CACHE_ORIGINAL - Unchanced class data.
|
||||
* ZR_CLASS_CACHE_MODIFIED - Changed/newest class data.
|
||||
* ZR_CLASS_CACHE_PLAYER (default) - Player cache. If this one
|
||||
* is used, index will be used as a client index.
|
||||
* @return True if the class has napalm grenades, false otherwise.
|
||||
*/
|
||||
stock bool:ClassGetHasNapalm(index, cachetype = ZR_CLASS_CACHE_PLAYER)
|
||||
{
|
||||
switch (cachetype)
|
||||
{
|
||||
case ZR_CLASS_CACHE_ORIGINAL:
|
||||
{
|
||||
return ClassData[index][class_has_napalm];
|
||||
}
|
||||
case ZR_CLASS_CACHE_MODIFIED:
|
||||
{
|
||||
return ClassDataCache[index][class_has_napalm];
|
||||
}
|
||||
case ZR_CLASS_CACHE_PLAYER:
|
||||
{
|
||||
return ClassPlayerCache[index][class_has_napalm];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the napalm grenades time from the specified class.
|
||||
*
|
||||
|
Reference in New Issue
Block a user