Fix mother zombie infection cycle not saving picked alternative candidates at end of cycle.
This commit is contained in:
		@@ -594,9 +594,21 @@ public Action:InfectMotherZombie(Handle:timer)
 | 
			
		||||
            RemoveFromArray(aCandidatesMain, i);
 | 
			
		||||
            candidatesMain--;
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            // No main candidates, reset the mother zombie cycle now before infecting anyone else.
 | 
			
		||||
            if (!resetcycle)
 | 
			
		||||
            {
 | 
			
		||||
                resetcycle = true;
 | 
			
		||||
                // Clear mother zombie round-robin cycle storage.
 | 
			
		||||
                SteamidCacheReset(g_hInfectMotherCycle);
 | 
			
		||||
 | 
			
		||||
                // Announce start of new cycle
 | 
			
		||||
                TranslationPrintToChatAll(true, false, "Mother zombie infect cycle reset");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Infect one of the alternate candidates.
 | 
			
		||||
        else if (candidatesAlt)
 | 
			
		||||
            if (candidatesAlt)
 | 
			
		||||
            {
 | 
			
		||||
                // Get a random array index.
 | 
			
		||||
                new i = Math_GetRandomInt(0, candidatesAlt - 1);
 | 
			
		||||
@@ -611,28 +623,12 @@ public Action:InfectMotherZombie(Handle:timer)
 | 
			
		||||
                // Remove player from eligible client list.
 | 
			
		||||
                RemoveFromArray(aCandidatesAlt, i);
 | 
			
		||||
                candidatesAlt--;
 | 
			
		||||
 | 
			
		||||
            // Enable the cycle reset.
 | 
			
		||||
            resetcycle = true;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        // We have no candidates at all, abort!
 | 
			
		||||
        else
 | 
			
		||||
            else // We have no candidates at all, abort!
 | 
			
		||||
            {
 | 
			
		||||
            // Enable the cycle reset.
 | 
			
		||||
            resetcycle = true;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    if (resetcycle)
 | 
			
		||||
    {
 | 
			
		||||
        // Restart the cycle.
 | 
			
		||||
        // Clear mother zombie round-robin cycle storage.
 | 
			
		||||
        SteamidCacheReset(g_hInfectMotherCycle);
 | 
			
		||||
 | 
			
		||||
        // Announce start of new cycle
 | 
			
		||||
        TranslationPrintToChatAll(true, false, "Mother zombie infect cycle reset");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Mother zombies have been infected.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user