Updated docs. Minior fixes.

Started writing docs about volumetric features.
Improved manual style, lined up tables.
Added missing attributes in anticamp conversion functions.
Fixed anticamp not extinguishing players who leave a volume that ignite players.
This commit is contained in:
richard
2009-10-20 01:45:13 +02:00
parent 11d51d9e7b
commit ffdf79f882
10 changed files with 617 additions and 216 deletions

View File

@ -261,7 +261,7 @@ CvarsCreate()
g_hCvarsList[CVAR_CLASSES_DEFAULT_ZOMBIE] = CreateConVar("zr_classes_default_zombie", "random", "Zombie class assigned to players on connect. [\"random\" = Random zombie class | \"\" = Class config default]");
g_hCvarsList[CVAR_CLASSES_DEFAULT_M_ZOMB] = CreateConVar("zr_classes_default_mother_zombie", "motherzombies","Zombie class assigned to mother zombies. [\"motherzombies\" = Random mother zombie class | \"random\" = Random regular zombie class | \"disabled\" = Don't change class on mother zombies]");
g_hCvarsList[CVAR_CLASSES_DEFAULT_HUMAN] = CreateConVar("zr_classes_default_human", "random", "Human class assigned to players on connect. [\"random\" = Random human class | \"\" = Class config default]");
g_hCvarsList[CVAR_CLASSES_DEFAULT_ADMIN] = CreateConVar("zr_classes_default_admin", "random", "Admin class assigned to admins on connect. [\"random\" = Random admin class | \"\" = Class config default]");
g_hCvarsList[CVAR_CLASSES_DEFAULT_ADMIN] = CreateConVar("zr_classes_default_admin", "random", "(Incomplete) Admin-mode class assigned to admins on connect. Do not confuse this with admin-only classes. [\"random\" = Random admin class | \"\" = Class config default]");
g_hCvarsList[CVAR_CLASSES_ZOMBIE_SELECT] = CreateConVar("zr_classes_zombie_select", "1", "Allow players to select zombie classes.");
g_hCvarsList[CVAR_CLASSES_HUMAN_SELECT] = CreateConVar("zr_classes_human_select", "1", "Allow players to select human classes.");
g_hCvarsList[CVAR_CLASSES_ADMIN_SELECT] = CreateConVar("zr_classes_admin_select", "1", "Allow admins to select admin mode classes. (Not to be confused by admin-only classes!)");

View File

@ -267,6 +267,29 @@ VolAnticampInit()
}
}
/**
* Called when a player leave a anticamp volume.
*
* @param client The client index.
* @param volumeIndex Index of volume the player left.
*/
VolAnticampOnPlayerLeave(client, volumeIndex)
{
new dataindex = Volumes[volumeIndex][Vol_DataIndex];
switch (AnticampData[dataindex][Anticamp_Action])
{
case Anticamp_Drug:
{
// TODO: Un-drug player.
}
case Anticamp_Ignite:
{
ExtinguishEntity(client);
}
}
}
/**
* Timer callback for anticamp volumes. Applies actions on players in volumes.
*/
@ -575,6 +598,10 @@ VolAnticampActionToString(VolAnticampAction:actionType, String:buffer[], maxlen,
{
return shortName ? strcopy(buffer, maxlen, "damage") : strcopy(buffer, maxlen, "Damage player");
}
case Anticamp_Slay:
{
return shortName ? strcopy(buffer, maxlen, "slay") : strcopy(buffer, maxlen, "Kill player");
}
case Anticamp_Drug:
{
return shortName ? strcopy(buffer, maxlen, "drug") : strcopy(buffer, maxlen, "Drug player ");
@ -610,6 +637,10 @@ stock VolAnticampAction:VolAnticampStringToAction(const String:action[])
{
return Anticamp_Damage;
}
else if (StrEqual(action, "slay", false))
{
return Anticamp_Slay;
}
else if (StrEqual(action, "drug", false))
{
return Anticamp_Drug;

View File

@ -46,7 +46,7 @@ Parameters:
Example:
zr_vol_add 0 0 0 100 200 300 anticamp team=humans delay=5 effect=wireframe effect_color=255,0,0
zr_vol_add 0 0 0 100 200 300 anticamp team=humans delay=5 amount=100
*/

View File

@ -74,6 +74,10 @@ VolOnPlayerLeave(client, volumeIndex)
new VolumeFeatureTypes:voltype = Volumes[volumeIndex][Vol_Type];
switch (voltype)
{
case VolFeature_Anticamp:
{
VolAnticampOnPlayerLeave(client, volumeIndex);
}
case VolFeature_ClassEdit:
{
VolClassEditOnPlayerLeave(client, volumeIndex);