@@ -1286,16 +1286,13 @@ void ZR_InitialInfection()
12861286 }
12871287
12881288 // the num of mz to infect
1289- int iMZToInfect = 0 ;
1290- bool bEnoughPlayersForInfection = pCandidateControllers.Count () >= g_cvarInfectSpawnMinCountReq.Get ();
1291- if (bEnoughPlayersForInfection)
1292- {
1293- iMZToInfect = pCandidateControllers.Count () / g_cvarInfectSpawnMZRatio.Get ();
1294- iMZToInfect = g_cvarInfectSpawnMinCount.Get () > iMZToInfect ? g_cvarInfectSpawnMinCount.Get () : iMZToInfect;
1295- }
1296-
1289+ int iMZToInfect = pCandidateControllers.Count () / g_cvarInfectSpawnMZRatio.Get ();
1290+ iMZToInfect = g_cvarInfectSpawnMinCount.Get () > iMZToInfect ? g_cvarInfectSpawnMinCount.Get () : iMZToInfect;
12971291 bool vecIsMZ[MAXPLAYERS ] = {false };
1298-
1292+
1293+ if (pCandidateControllers.Count () < g_cvarInfectSpawnMinCountReq.Get ())
1294+ iMZToInfect = 0 ;
1295+
12991296 // get spawn points
13001297 std::vector<SpawnPoint*> spawns = ZR_GetSpawns ();
13011298 if (g_cvarInfectSpawnType.Get () == (int )EZRSpawnType::RESPAWN && !spawns.size ())
@@ -1371,17 +1368,8 @@ void ZR_InitialInfection()
13711368 if (g_cvarRespawnDelay.Get () < 0 .0f )
13721369 g_bRespawnEnabled = false ;
13731370
1374-
1375- if (bEnoughPlayersForInfection)
1376- {
1377- SendHudMessageAll (4 , EHudPriority::InfectionCountdown, " First infection has started!" );
1378- ClientPrintAll (HUD_PRINTTALK , ZR_PREFIX " First infection has started! Good luck, survivors!" );
1379- }
1380- else
1381- {
1382- ClientPrintAll (HUD_PRINTTALK , ZR_PREFIX " Not enough players to start infection!" );
1383- }
1384-
1371+ SendHudMessageAll (4 , EHudPriority::InfectionCountdown, " First infection has started!" );
1372+ ClientPrintAll (HUD_PRINTTALK , ZR_PREFIX " First infection has started! Good luck, survivors!" );
13851373 g_ZRRoundState = EZRRoundState::POST_INFECTION ;
13861374}
13871375
0 commit comments