Minior bug fixes. Added module flags for log system. CVAR changes. Added support for random default class (per player).

This commit is contained in:
richard
2009-02-13 22:57:02 +01:00
parent b46d886c9c
commit 84a4c68596
15 changed files with 298 additions and 151 deletions

View File

@ -15,7 +15,7 @@
#undef REQUIRE_PLUGIN
#include <market>
#define VERSION "2.5.1.26"
#define VERSION "2.5.1.27"
#include "zr/zombiereloaded"
#include "zr/global"
@ -114,15 +114,11 @@ public OnMapStart()
LoadModelData();
LoadDownloadData();
/* Reset to default class if class selection saving is disabled. */
if (!GetConVarBool(gCvars[CVAR_CLASSES_SAVE]))
new i;
new classindex = GetDefaultClassIndex();
for (i = 1; i <= MAXPLAYERS; i++)
{
new i;
new classindex = GetDefaultClassIndex();
for (i = 1; i <= MAXPLAYERS; i++)
{
pClass[i] = classindex;
}
pClass[i] = classindex;
}
Anticamp_Startup();
@ -185,18 +181,11 @@ public OnClientDisconnect(client)
PlayerLeft(client);
ZTeleResetClient(client);
decl String:debug_msg[64];
for (new x = 0; x < MAXTIMERS; x++)
{
if (tHandles[client][x] != INVALID_HANDLE)
{
if (LogHasFlag(LOG_DEBUG_MAX_DETAIL))
{
Format(debug_msg, sizeof(debug_msg), "Killing timer %i with handle %x.", x, tHandles[client][x]);
ZR_LogMessageFormatted(client, "OnClientDisconnect", "Killing timers", debug_msg, true);
}
KillTimer(tHandles[client][x]);
tHandles[client][x] = INVALID_HANDLE;
}