hlxstatsx_ze: dont be racist to zombies
This commit is contained in:
parent
7c8147a50c
commit
1c3352f08a
@ -133,12 +133,19 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
|||||||
bool bAwardZombies = ((g_tMinimalRoundDuration == INVALID_HANDLE) && (hEvent.GetInt("winner") == CS_TEAM_T));
|
bool bAwardZombies = ((g_tMinimalRoundDuration == INVALID_HANDLE) && (hEvent.GetInt("winner") == CS_TEAM_T));
|
||||||
|
|
||||||
int iAliveHumans;
|
int iAliveHumans;
|
||||||
|
int iAliveZombies;
|
||||||
|
|
||||||
for (int client = 1; client <= MaxClients; client++)
|
for (int client = 1; client <= MaxClients; client++)
|
||||||
{
|
{
|
||||||
if (IsValidClient(client) && GetClientTeam(client) == CS_TEAM_CT)
|
if (IsValidClient(client) && GetClientTeam(client) == CS_TEAM_CT)
|
||||||
|
{
|
||||||
iAliveHumans++;
|
iAliveHumans++;
|
||||||
}
|
}
|
||||||
|
else if(IsValidClient(client) && GetClientTeam(client) == CS_TEAM_T)
|
||||||
|
{
|
||||||
|
iAliveZombies++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int client = 1; client <= MaxClients; client++)
|
for (int client = 1; client <= MaxClients; client++)
|
||||||
{
|
{
|
||||||
@ -160,7 +167,12 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
|||||||
}
|
}
|
||||||
else if (bAwardZombies && g_bIsZombie[client])
|
else if (bAwardZombies && g_bIsZombie[client])
|
||||||
{
|
{
|
||||||
if (g_bMotherZM[client])
|
|
||||||
|
if (iAliveZombies == 1)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(client, "triggered", "ze_z_win_solo");
|
||||||
|
}
|
||||||
|
else if (g_bMotherZM[client])
|
||||||
{
|
{
|
||||||
char sPlayerEvent[32];
|
char sPlayerEvent[32];
|
||||||
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_m_win_%d", g_cvarDifficultyZombie.IntValue);
|
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_m_win_%d", g_cvarDifficultyZombie.IntValue);
|
||||||
|
Loading…
Reference in New Issue
Block a user