hlstatsx: update ZE module.
Seems the ZR native's require people to actually be alive??
This commit is contained in:
parent
5792332f34
commit
49b1e6eed4
@ -22,6 +22,8 @@ Handle g_tMinimalRoundDuration = INVALID_HANDLE;
|
|||||||
int g_iKillCount[MAXPLAYERS+1] = 0;
|
int g_iKillCount[MAXPLAYERS+1] = 0;
|
||||||
|
|
||||||
/* BOOLEANS */
|
/* BOOLEANS */
|
||||||
|
bool g_bIsHuman[MAXPLAYERS+1] = false;
|
||||||
|
bool g_bIsZombie[MAXPLAYERS+1] = false;
|
||||||
bool g_bMotherZM[MAXPLAYERS+1] = false;
|
bool g_bMotherZM[MAXPLAYERS+1] = false;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -93,11 +95,23 @@ public Action OnRoundMinimalDuration(Handle timer)
|
|||||||
g_tMinimalRoundDuration = INVALID_HANDLE;
|
g_tMinimalRoundDuration = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
// Purpose:
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
public void ZR_OnClientHumanPost(int client, bool respawn, bool protect)
|
||||||
|
{
|
||||||
|
g_bIsHuman[client] = true;
|
||||||
|
g_bIsZombie[client] = false;
|
||||||
|
g_bMotherZM[client] = false;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn)
|
public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn)
|
||||||
{
|
{
|
||||||
|
g_bIsHuman[client] = false;
|
||||||
|
g_bIsZombie[client] = true;
|
||||||
g_bMotherZM[client] = motherInfect;
|
g_bMotherZM[client] = motherInfect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,14 +127,14 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
|||||||
{
|
{
|
||||||
if (IsValidClient(client))
|
if (IsValidClient(client))
|
||||||
{
|
{
|
||||||
if (bAwardHumans && ZR_IsClientHuman(client))
|
if (bAwardHumans && g_bIsHuman[client])
|
||||||
{
|
{
|
||||||
char sPlayerEvent[32];
|
char sPlayerEvent[32];
|
||||||
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_h_win_%d", g_cvarDifficultyHuman.IntValue);
|
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_h_win_%d", g_cvarDifficultyHuman.IntValue);
|
||||||
|
|
||||||
LogPlayerEvent(client, "triggered", sPlayerEvent);
|
LogPlayerEvent(client, "triggered", sPlayerEvent);
|
||||||
}
|
}
|
||||||
else if (bAwardZombies && ZR_IsClientZombie(client))
|
else if (bAwardZombies && g_bIsZombie[client])
|
||||||
{
|
{
|
||||||
if (g_bMotherZM[client])
|
if (g_bMotherZM[client])
|
||||||
{
|
{
|
||||||
@ -179,14 +193,14 @@ public void EndKillStreak(int client)
|
|||||||
if (g_iKillCount[client] > g_cvarMaximumStreak.IntValue)
|
if (g_iKillCount[client] > g_cvarMaximumStreak.IntValue)
|
||||||
g_iKillCount[client] = g_cvarMaximumStreak.IntValue;
|
g_iKillCount[client] = g_cvarMaximumStreak.IntValue;
|
||||||
|
|
||||||
if (ZR_IsClientHuman(client))
|
if (g_bIsHuman[client])
|
||||||
{
|
{
|
||||||
char sPlayerEvent[32];
|
char sPlayerEvent[32];
|
||||||
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_h_kill_streak_%d", RoundToFloor(float(g_iKillCount[client]) / float(g_cvarStreakInterval.IntValue)) * g_cvarStreakInterval.IntValue);
|
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_h_kill_streak_%d", RoundToFloor(float(g_iKillCount[client]) / float(g_cvarStreakInterval.IntValue)) * g_cvarStreakInterval.IntValue);
|
||||||
|
|
||||||
LogPlayerEvent(client, "triggered", sPlayerEvent);
|
LogPlayerEvent(client, "triggered", sPlayerEvent);
|
||||||
}
|
}
|
||||||
else if (ZR_IsClientZombie(client))
|
else if (g_bIsZombie[client])
|
||||||
{
|
{
|
||||||
if (g_bMotherZM[client])
|
if (g_bMotherZM[client])
|
||||||
{
|
{
|
||||||
@ -213,8 +227,10 @@ public void EndKillStreak(int client)
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
stock void ResetClient(int client)
|
stock void ResetClient(int client)
|
||||||
{
|
{
|
||||||
|
g_bIsHuman[client] = true;
|
||||||
|
g_bIsZombie[client] = false;
|
||||||
|
g_bMotherZM[client] = false;
|
||||||
g_iKillCount[client] = 0;
|
g_iKillCount[client] = 0;
|
||||||
g_bMotherZM[client] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user