mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-02-05 10:10:30 +03:00
Break loop in OLD_CheckBuyZone, OLD_CheckBombTarget, OLD_CheckRescueZone (#141)
stop loop when match is found
This commit is contained in:
parent
d9eeceaede
commit
fed41984d8
@ -6331,7 +6331,12 @@ void OLD_CheckBuyZone(CBasePlayer *player)
|
||||
while ((pSpot = UTIL_FindEntityByClassname(pSpot, pszSpawnClass)))
|
||||
{
|
||||
if ((pSpot->pev->origin - player->pev->origin).Length() < 200.0f)
|
||||
{
|
||||
player->m_signals.Signal(SIGNAL_BUY);
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6342,7 +6347,12 @@ void OLD_CheckBombTarget(CBasePlayer *player)
|
||||
while ((pSpot = UTIL_FindEntityByClassname(pSpot, "info_bomb_target")))
|
||||
{
|
||||
if ((pSpot->pev->origin - player->pev->origin).Length() <= 256.0f)
|
||||
{
|
||||
player->m_signals.Signal(SIGNAL_BOMB);
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6352,7 +6362,12 @@ void OLD_CheckRescueZone(CBasePlayer *player)
|
||||
while ((pSpot = UTIL_FindEntityByClassname(pSpot, "info_hostage_rescue")))
|
||||
{
|
||||
if ((pSpot->pev->origin - player->pev->origin).Length() <= 256.0f)
|
||||
{
|
||||
player->m_signals.Signal(SIGNAL_RESCUE);
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user