This commit is contained in:
neon
2019-06-02 21:53:41 +02:00
3 changed files with 62 additions and 17 deletions
+13 -1
View File
@@ -133,11 +133,18 @@ public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast
bool bAwardZombies = ((g_tMinimalRoundDuration == INVALID_HANDLE) && (hEvent.GetInt("winner") == CS_TEAM_T));
int iAliveHumans;
int iAliveZombies;
for (int client = 1; client <= MaxClients; client++)
{
if (IsValidClient(client) && GetClientTeam(client) == CS_TEAM_CT)
{
iAliveHumans++;
}
else if(IsValidClient(client) && GetClientTeam(client) == CS_TEAM_T)
{
iAliveZombies++;
}
}
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])
{
if (g_bMotherZM[client])
if (iAliveZombies == 1)
{
LogPlayerEvent(client, "triggered", "ze_z_win_solo");
}
else if (g_bMotherZM[client])
{
char sPlayerEvent[32];
Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_m_win_%d", g_cvarDifficultyZombie.IntValue);