From 51e921b0f65db97bc60b4a214be6babb5384632b Mon Sep 17 00:00:00 2001 From: s1lentq Date: Thu, 14 Jan 2016 18:59:01 +0600 Subject: [PATCH] Fix: bug with check C4 (CHalfLifeMultiplay::IsBombPlanted) Cleanup: cosmetic changes --- regamedll/dlls/multiplay_gamerules.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 40a227dc..5dcfd968 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -1412,7 +1412,7 @@ bool CHalfLifeMultiplay::TeamExterminationCheck(int NumAliveTerrorist, int NumAl { if ((m_iNumCT > 0 && m_iNumSpawnableCT > 0) && (m_iNumTerrorist > 0 && m_iNumSpawnableTerrorist > 0)) { - if (!NumAliveTerrorist && NumDeadTerrorist && NumAliveCT > 0) + if (NumAliveTerrorist == 0 && NumDeadTerrorist != 0 && NumAliveCT > 0) { CBaseEntity *temp = NULL; bool nowin = false; @@ -3023,7 +3023,7 @@ bool CHalfLifeMultiplay::IsBombPlanted(void) { CGrenade *bomb = NULL; - if ((bomb = (CGrenade *)UTIL_FindEntityByClassname(bomb, "grenade")) != NULL) + while ((bomb = (CGrenade *)UTIL_FindEntityByClassname(bomb, "grenade")) != NULL) { if (bomb->m_bIsC4) { @@ -3038,7 +3038,7 @@ bool CHalfLifeMultiplay::IsBombPlanted(void) /* <115229> ../cstrike/dlls/multiplay_gamerules.cpp:2971 */ void CHalfLifeMultiplay::MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound(int iTeam) { - for (int i = 1; i <= gpGlobals->maxClients; i++) + for (int i = 1; i <= gpGlobals->maxClients; ++i) { CBasePlayer *player = reinterpret_cast(UTIL_PlayerByIndex(i));