mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 14:45:38 +03:00
Fix a crash when func_breakable signals it for CCSBot::OnEvent
This commit is contained in:
parent
0cd233dc06
commit
cbfe8a1a0c
@ -266,8 +266,17 @@ void CCSBot::OnEvent(GameEventType event, CBaseEntity *pEntity, CBaseEntity *pOt
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// Make sure that the entity is a player,
|
||||
// because here the entity can come as CBreakable with event EVENT_BREAK_METAL
|
||||
if (pPlayer && !pPlayer->IsPlayer())
|
||||
return;
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Process radio events from our team
|
||||
if (pPlayer && BotRelationship(pPlayer) == BOT_TEAMMATE && event > EVENT_START_RADIO_1 && event < EVENT_END_RADIO)
|
||||
|
Loading…
Reference in New Issue
Block a user