Added command for modifying or scaling class attributes. Minior fixes, see details.

Fixed error getting default classes on early player connect (bots, source tv, etc.).
Fixed jump boost not resetting height velocity. Changed to add to velocity. Jump from boost platform still doesn't work because the velocity is set too early.
Added check for reserved class names when validating.
Updated class default attributes and jump limits.
This commit is contained in:
richard
2009-05-10 18:49:47 +02:00
parent 969aa19b85
commit 4117519b39
9 changed files with 793 additions and 121 deletions

View File

@ -96,6 +96,20 @@ ClassValidateAttributes(classindex)
{
flags += ZR_CLASS_FLAG_NAME;
}
else
{
decl String:name[64];
strcopy(name, sizeof(name), ClassData[classindex][class_name]);
// Check for reserved name keyworks.
if (StrEqual(name, "all", false) ||
StrEqual(name, "humans", false) ||
StrEqual(name, "zombies", false) ||
StrEqual(name, "admins", false))
{
flags += ZR_CLASS_FLAG_NAME;
}
}
// Description.
if (strlen(ClassData[classindex][class_description]) < ZR_CLASS_DESCRIPTION_MIN)
@ -195,7 +209,7 @@ ClassValidateAttributes(classindex)
new infect_gain = ClassData[classindex][class_health_infect_gain];
if (!(infect_gain >= ZR_CLASS_HEALTH_INFECT_GAIN_MIN && infect_gain <= ZR_CLASS_HEALTH_INFECT_GAIN_MAX))
{
flags += ZR_CLASS_FLAG_INFECT_GAIN;
flags += ZR_CLASS_FLAG_HEALTH_INFECT_GAIN;
}
// Kill bonus.