diff --git a/regamedll/dlls/bot/cs_bot_event.cpp b/regamedll/dlls/bot/cs_bot_event.cpp index a562d4f2..0c3fb6e6 100644 --- a/regamedll/dlls/bot/cs_bot_event.cpp +++ b/regamedll/dlls/bot/cs_bot_event.cpp @@ -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)