mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-06-14 14:52:07 +03:00
Fix memory corruption bugs due the array index out of bounds. (#147)
This commit is contained in:
parent
3f4bcd9b96
commit
3a1e08abd4
@ -1589,11 +1589,21 @@ bool BotChatterInterface::ShouldSpeak() const
|
|||||||
|
|
||||||
float BotChatterInterface::GetRadioSilenceDuration()
|
float BotChatterInterface::GetRadioSilenceDuration()
|
||||||
{
|
{
|
||||||
return IMPL(m_radioSilenceInterval)[ m_me->m_iTeam - 1 ].GetElapsedTime();
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (m_me->m_iTeam != CT && m_me->m_iTeam != TERRORIST)
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return IMPL(m_radioSilenceInterval)[m_me->m_iTeam - 1].GetElapsedTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BotChatterInterface::ResetRadioSilenceDuration()
|
void BotChatterInterface::ResetRadioSilenceDuration()
|
||||||
{
|
{
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (m_me->m_iTeam != CT && m_me->m_iTeam != TERRORIST)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
IMPL(m_radioSilenceInterval)[m_me->m_iTeam - 1].Reset();
|
IMPL(m_radioSilenceInterval)[m_me->m_iTeam - 1].Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user