@@ -2586,7 +2586,7 @@ void CBot::StartGame()
25862586
25872587 break ;
25882588 case MOD_GEARBOX: // Support for OP4CTF [APG]RoboCop[CL]
2589-
2589+
25902590 if (std::strncmp (" op4ctf_" , STRING (gpGlobals->mapname ), 7 ) == 0 ||
25912591 std::strncmp (" op4cp_" , STRING (gpGlobals->mapname ), 6 ) == 0 )
25922592 {
@@ -9492,7 +9492,12 @@ BOOL CBot::IsEnemy(edict_t* pEntity)
94929492 break;*/
94939493 case MOD_GEARBOX:
94949494 {
9495- // gBotGlobals.m_bTeamPlay = true; //Required to prevent team shooting in Op4CTF? [APG]RoboCop[CL]
9495+ const char * szClassname = const_cast <char *>(STRING (pEntity->v .classname ));
9496+
9497+ if (std::strcmp (szClassname, " func_breakable" ) == 0 )
9498+ {
9499+ return BotFunc_BreakableIsEnemy (pEntity, m_pEdict);
9500+ }
94969501
94979502 if (!EntityIsAlive (pEntity))
94989503 return false ;
@@ -9503,8 +9508,6 @@ BOOL CBot::IsEnemy(edict_t* pEntity)
95039508 std::strncmp (" op4cp_" , STRING (gpGlobals->mapname ), 6 ) == 0 ))
95049509 {
95059510 // code from Sandbot by tschumann
9506- const char * szClassname = const_cast <char *>(STRING (pEntity->v .classname ));
9507-
95089511 // char* infobuffer = GET_INFOKEYBUFFER(pEntity);
95099512 // std::strcpy(szClassname, INFOKEY_VALUE(infobuffer, "model"));
95109513
@@ -9521,7 +9524,7 @@ BOOL CBot::IsEnemy(edict_t* pEntity)
95219524 // different teams are enemies
95229525 return pEntity->v .flags & FL_CLIENT && GetTeam () != UTIL_GetTeam (pEntity);
95239526 }
9524- else
9527+ else if (pEntity-> v . flags & FL_CLIENT) // different model for team play
95259528 {
95269529 char * infobuffer1 = (*g_engfuncs.pfnGetInfoKeyBuffer )(m_pEdict);
95279530 char * infobuffer2 = (*g_engfuncs.pfnGetInfoKeyBuffer )(pEntity);
0 commit comments