Put infection handling in its own core module, added infect sound to downloads table, updated cvars, made an account module (handles cash), zombies now drop weapons on infect (all of them), removed RemoveAllItems, weapon api can handle it and its unneeded now.

This commit is contained in:
Greyscale
2009-04-22 04:53:19 +02:00
parent 557b6d883c
commit b99d253477
19 changed files with 971 additions and 701 deletions

View File

@ -14,11 +14,6 @@
*/
new Handle:tSpawnProtect[MAXPLAYERS + 1];
/**
* Array for flagging client to be protected.
*/
new bool:pSpawnProtect[MAXPLAYERS + 1];
/**
* Array for storing time left for spawn protection per client.
*/
@ -43,7 +38,7 @@ SpawnProtectClientInit(client)
SpawnProtectOnClientSpawn(client)
{
// Disable spawn protection on client.
pSpawnProtect[client] = false;
bInfectImmune[client][INFECT_TYPE_NORMAL] = false;
// If timer is currently running, kill it.
if (tSpawnProtect[client] != INVALID_HANDLE)
@ -80,7 +75,7 @@ SpawnProtectOnClientSpawn(client)
if (!respawn_zombie && !RespawnKilledByWorld(client))
{
// Set spawn protect flag on client.
pSpawnProtect[client] = true;
bInfectImmune[client][INFECT_TYPE_NORMAL] = true;
// Set improved attributes
// (Move to cvar?)
@ -149,7 +144,7 @@ public Action:SpawnProtectTimer(Handle:timer, any:client)
if (pSpawnProtectTime[client] <= 0)
{
// Remove protect flag.
pSpawnProtect[client] = false;
bInfectImmune[client][INFECT_TYPE_NORMAL] = false;
// Tell client spawn protection is over.
ZR_HudHint(client, "Spawn protection end");