mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-14 05:30:02 +03:00
CCSBot::FindMostDangerousThreat: Fix crash when m_pActiveItem is null Related #1055
This commit is contained in:
parent
797c265db3
commit
5bf71bdb18
@ -797,7 +797,9 @@ CBasePlayer *CCSBot::FindMostDangerousThreat()
|
||||
float distSq = d.LengthSquared();
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if (isSniperRifle(pPlayer->m_pActiveItem)) {
|
||||
CBasePlayerWeapon *pCurrentWeapon = static_cast<CBasePlayerWeapon *>(pPlayer->m_pActiveItem);
|
||||
if (pCurrentWeapon && isSniperRifle(pCurrentWeapon))
|
||||
{
|
||||
m_isEnemySniperVisible = true;
|
||||
if (sniperThreat)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user