View Single Post
Suicidal tendencies of the Botmanīs BOT#1o
Old
  (#1)
MIFUNE
Member
 
Status: Offline
Posts: 13
Join Date: Mar 2014
Warning Suicidal tendencies of the Botmanīs BOT#1o - 23-03-2014

Hi. First of all I know that this BOT is almost 10 years old, but it works perfectly for my MOD...

http://www.moddb.com/mods/zion-warcry

...except for the fact that they have a serious and stupid suicidal tendencies. I have tried to use the code in the BOTīs source which is used to find walls, but with no luck.

Code:
BOOL CBot::BotChecFloor( void )
{
   Vector v_src, v_up;
   TraceResult tr;

   UTIL_MakeVectors( pev->v_angle );

   // do a trace down...

   v_src = pev->origin;
   v_left = v_src + gpGlobals->v_up * -40;  // 40 units down

   UTIL_TraceLine( v_src, v_left, dont_ignore_monsters, ENT(pev), &tr);

   // check if the trace hit something...
   if (tr.flFraction < 1.0)
   {
      if (f_wall_down = 1)
         f_wall_down = gpGlobals->time;

      return TRUE;
   }

   return FALSE;
}
Itīs the best approach I have found. In the first version BOTs get stuck (2007 version), and now (2014) I have made them walk on the bridges, buuuuuuut... even if they aparently check that thereīs no floor beneath them (they stop and start walking in other direction), they finally return to the void and fall to death.

What should I do?. Any help will be added to the credits.

Thanks in anticipation.
  
Reply With Quote