From edf60b4e323af391ff6635f9313c2db333cf2d9f Mon Sep 17 00:00:00 2001 From: Vaqtincha Date: Tue, 8 Jun 2021 22:12:54 +0500 Subject: [PATCH] chastise friendly fire from only humans. --- regamedll/dlls/bot/cs_bot_event.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/bot/cs_bot_event.cpp b/regamedll/dlls/bot/cs_bot_event.cpp index 854675179..33bdec787 100644 --- a/regamedll/dlls/bot/cs_bot_event.cpp +++ b/regamedll/dlls/bot/cs_bot_event.cpp @@ -82,7 +82,12 @@ void CCSBot::OnEvent(GameEventType event, CBaseEntity *pEntity, CBaseEntity *pOt CBasePlayer *pKiller = static_cast(pOther); // check that attacker is an enemy (for friendly fire, etc) - if (pKiller && pKiller->IsPlayer()) + if (pKiller && pKiller->IsPlayer() +#ifdef REGAMEDLL_FIXES + // why should they kill each other because of aggression + && !pKiller->IsBot() +#endif + ) { // check if we saw our friend die - dont check FOV - assume we're aware of our surroundings in combat // snipers stay put