mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Bot vision update.
* Bots can't see invisible enemies * Bots ignore enemies with flag FL_NOTARGET
This commit is contained in:
parent
30c3586580
commit
932001b591
@ -249,6 +249,11 @@ bool CCSBot::IsVisible(const Vector *pos, bool testFOV) const
|
|||||||
// Check parts in order of importance. Return the first part seen in "visParts" if it is non-NULL.
|
// Check parts in order of importance. Return the first part seen in "visParts" if it is non-NULL.
|
||||||
bool CCSBot::IsVisible(CBasePlayer *pPlayer, bool testFOV, unsigned char *visParts) const
|
bool CCSBot::IsVisible(CBasePlayer *pPlayer, bool testFOV, unsigned char *visParts) const
|
||||||
{
|
{
|
||||||
|
#ifdef REGAMEDLL_ADD // REGAMEDLL_FIXES ?
|
||||||
|
if ((pPlayer->pev->flags & FL_NOTARGET) || (pPlayer->pev->effects & EF_NODRAW))
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
Vector spot = pPlayer->pev->origin;
|
Vector spot = pPlayer->pev->origin;
|
||||||
unsigned char testVisParts = NONE;
|
unsigned char testVisParts = NONE;
|
||||||
|
|
||||||
@ -714,6 +719,10 @@ CBasePlayer *CCSBot::FindMostDangerousThreat()
|
|||||||
if (!pPlayer->IsAlive())
|
if (!pPlayer->IsAlive())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD // REGAMEDLL_FIXES ?
|
||||||
|
if ((pPlayer->pev->flags & FL_NOTARGET) || (pPlayer->pev->effects & EF_NODRAW))
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
// is it an enemy?
|
// is it an enemy?
|
||||||
if (BotRelationship(pPlayer) == BOT_TEAMMATE)
|
if (BotRelationship(pPlayer) == BOT_TEAMMATE)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user