View Single Post
Re: Podbot Beta 3.0 Updates? ^^
Old
  (#9)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Podbot Beta 3.0 Updates? ^^ - 28-06-2011

bot.cpp - from the line 3093:
Code:
      if (!FNullEnt (pBot->pLastEnemy) && (pBot->bShootThruHeard)) // KWo - 13.07.2008
      {
         pBot->iAimFlags |= AIM_LASTENEMY;
         pBot->iStates |= STATE_SUSPECTENEMY;
         if ((pBot->f_bot_see_enemy_time + 1.0 < gpGlobals->time)
            && (pBot->fLastHeardEnOrgUpdateTime < gpGlobals->time)
            && (pBot->fLastSeenEnOrgUpdateTime < gpGlobals->time))
         {
            pBot->vecLastEnemyOrigin.x += RANDOM_FLOAT (-300.0, 300.0);
            pBot->vecLastEnemyOrigin.y += RANDOM_FLOAT (-300.0, 300.0);
            pBot->fLastHeardEnOrgUpdateTime = gpGlobals->time + 1.0;
         }
      }
If the enemy is "shootable" through the obstacle, every 1 second his position is somehow estimated (he cannot know exactly where the enemy is). As You can see it affects x and y only - so he shouldn't shoot into the sky...
  
Reply With Quote