.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Bug Reports
Bug Reports Post any bug you experience with the latest release of this bot here

Reply
 
Thread Tools
Podbots cannot shoot breakables
Old
  (#1)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Podbots cannot shoot breakables - 07-07-2004

well here's one problem I can't solve since I barely know any math...
and here's the reason....

This image shows the 2 tracelines sent to try and search for the breakable..
as you can see.. they are going the wrong direction..
here's the code..
Code:
bool BotFindBreakable (bot_t *pBot)
{
   // Checks if Bot is blocked by a Shootable Breakable in his moving direction

   TraceResult tr;
   edict_t *pEdict = pBot->pEdict;

   Vector v_src = pEdict->v.origin;
   Vector vecDirection = (pBot->pShootBreakable->v.origin - v_src).Normalize ();
   Vector v_dest = v_src + vecDirection * 50;

   TRACE_LINE (v_src, v_dest, dont_ignore_monsters, pEdict, &tr);
   if ((tr.flFraction != 1.0)
       && (FStrEq ("func_breakable", STRING (tr.pHit->v.classname))
       || FStrEq ("func_pushable", STRING (tr.pHit->v.classname)))
       && IsShootableBreakable (tr.pHit))
   {
      pBot->vecBreakable = tr.vecEndPos;
      return (TRUE);
   }

   v_src = GetGunPosition (pEdict);
   vecDirection = (pBot->pShootBreakable->v.origin - v_src).Normalize ();
   v_dest = v_src + vecDirection * 50;

   TRACE_LINE (v_src, v_dest, dont_ignore_monsters, pEdict, &tr);
   if ((tr.flFraction != 1.0)
       && (FStrEq ("func_breakable", STRING (tr.pHit->v.classname))
       || FStrEq ("func_pushable", STRING (tr.pHit->v.classname)))
       && IsShootableBreakable (tr.pHit))
   {
      pBot->vecBreakable = tr.vecEndPos;
      return (TRUE);
   }

   pBot->pShootBreakable = NULL;
   pBot->vecBreakable = g_vecZero;
   return (FALSE);
}
All we need is a math wiz that knows how to figure out what direction a point is from another point...
anyone know how?
[edit]
Me are reading pages that teach this stuff
[/edit]

Last edited by sPlOrYgOn; 07-07-2004 at 07:32..
  
Reply With Quote
Re: Podbots cannot shoot breakables
Old
  (#2)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Podbots cannot shoot breakables - 09-07-2004

YAYA!
It's fixed !
here's the new code:
Code:
bool BotFindBreakable (bot_t *pBot)
{
   // Checks if Bot is blocked by a Shootable Breakable in his moving direction

   TraceResult tr;
   edict_t *pEdict = pBot->pEdict;

   Vector v_src = pEdict->v.origin;
   Vector vecDirection = (VecBModelOrigin (pBot->pShootBreakable) - v_src).Normalize ();
   Vector v_dest = v_src + vecDirection * 50;

   TRACE_LINE (v_src, v_dest, dont_ignore_monsters, pEdict, &tr);
   if ((tr.flFraction != 1.0)
       && (FStrEq ("func_breakable", STRING (tr.pHit->v.classname))
       || FStrEq ("func_pushable", STRING (tr.pHit->v.classname)))
       && IsShootableBreakable (tr.pHit))
   {
      pBot->vecBreakable = tr.vecEndPos;
      return (TRUE);
   }

   v_src = GetGunPosition (pEdict);
   vecDirection = (VecBModelOrigin (pBot->pShootBreakable) - v_src).Normalize ();
   v_dest = v_src + vecDirection * 50;

   TRACE_LINE (v_src, v_dest, dont_ignore_monsters, pEdict, &tr);
   if ((tr.flFraction != 1.0)
       && (FStrEq ("func_breakable", STRING (tr.pHit->v.classname))
       || FStrEq ("func_pushable", STRING (tr.pHit->v.classname)))
       && IsShootableBreakable (tr.pHit))
   {
      pBot->vecBreakable = tr.vecEndPos;
      return (TRUE);
   }

   pBot->pShootBreakable = NULL;
   pBot->vecBreakable = g_vecZero;
   return (FALSE);
}
I changed it from pShootBreakable->v.origin to VecBModelOrigin (pBot->pShootBreakable)
I don't know why v.origin is g_vecZero though.. seems strange..

[edit]
new dll can be found here http://www.mapzap.org/files/podbot/podbotBETA.zip
[/edit]

Last edited by sPlOrYgOn; 09-07-2004 at 03:56..
  
Reply With Quote
Re: Podbots cannot shoot breakables
Old
  (#3)
>BKA< T Wrecks
Moderator [PBmm/Waypointing]& PODBot mm waypointer
 
>BKA< T Wrecks's Avatar
 
Status: Offline
Posts: 1,492
Join Date: Feb 2004
Location: C.C.A.A., Germania
Default Re: Podbots cannot shoot breakables - 09-07-2004

That's odd... I've never seen bots that got stuck in breakables (unless there were multiple breakables and the bot shot only one of them to pieces). Sometimes it took them some time to shoot it, but in the end it always worked. Well, let's see how the new dll performs...



Roses are #FF0000, violets are #0000FF // all my base, are belong to you.

  
Reply With Quote
Re: Podbots cannot shoot breakables
Old
  (#4)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Podbots cannot shoot breakables - 09-07-2004

Quote:
Originally Posted by >BKA< T Wrecks
That's odd... I've never seen bots that got stuck in breakables (unless there were multiple breakables and the bot shot only one of them to pieces). Sometimes it took them some time to shoot it, but in the end it always worked. Well, let's see how the new dll performs...
Try older beta and cs_house. There is a spawn point for T under ground. This point is exactly in the some breakable box. The same for cs_castle. Two breakable objects and one was no problem for bots , this second (some wood's obstacle under ground) was a problem. Now it's solved.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com