.:: 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 > Releases, Installers, Docs & Coding
Releases, Installers, Docs & Coding Where the official development happens

Reply
 
Thread Tools
Re: podbot grenade throwing bug
Old
  (#21)
Abu Amok
Member
 
Status: Offline
Posts: 17
Join Date: Mar 2004
Default Re: podbot grenade throwing bug - 01-06-2004

hi!

in my opinion studying ballistics to solve the grenade throwing bug is a
somewhat "academic" approach..

As this isn't about reinventing the wheel I' d rather propose a more practical attempt: Check out how the others are doing...

Joebot does throw grenades quite frequent and well aimed and at some point in the code there's a hint like "substrakt 15 to avoid the grenade hitting the ceiling" or so.

So why not get "inspiration" by someone who solved the problem? (And probably follows this thread leaning back in his comfortable chair with this biiig grin in his face?)
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#22)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: podbot grenade throwing bug - 02-06-2004

Aspirin, stop grinning immediately, or I'll break in your house by night and convert all JoeBot XP to ANSI C and delete the original!



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#23)
Huntkillaz
Member
 
Huntkillaz's Avatar
 
Status: Offline
Posts: 594
Join Date: Mar 2004
Location: Middle Earth (New Zealand)
Default Re: podbot grenade throwing bug - 05-06-2004

so is the joebot author wanting to give us a hand???


●_•
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#24)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: podbot grenade throwing bug - 05-06-2004

dunno if there's much to say about it, just look at the code. checvectoss and checkvecthrow are just from the SDK I think.
In CSBotCS look at CheckGrenadeThrowing(), ( lol, another function where I should add some comments when I have time )
in CBotBase, take a look at the CBotBase :: HandleGOrder() function

( I know Pierre, i'm cheating but still grinning anyway )


  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#25)
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: podbot grenade throwing bug - 05-06-2004

thanks!
I'll look at it right now
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#26)
[NvT]_KaszpiR_
Member
 
[NvT]_KaszpiR_'s Avatar
 
Status: Offline
Posts: 322
Join Date: Apr 2004
Default Re: podbot grenade throwing bug - 09-06-2004

i guess more advanced will be where grenade will land after boucing off the wall etc
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#27)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: podbot grenade throwing bug - 09-06-2004

yes, that would be cool, but the more bounces you calculate, the more possibilities you have to calculate. you won't be able to calc all those possibilities in realtime any more from a certain point on. Of course one could think about optimizations, but checkvectoss works fine most of the time, so this complicated stuff wouldnt be notices by any bot user I guess


  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#28)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: podbot grenade throwing bug - 13-07-2004

from bot_combat.cpp VecCheckToss() function:
Code:
   // get a rough idea of how high it can be thrown
   vecMidPoint = vecSpot1 + (vecSpot2 - vecSpot1) * 0.5;
   TRACE_LINE (vecMidPoint, vecMidPoint + Vector (0, 0, 500), ignore_monsters, pEdict, &tr);
   if (tr.flFraction != 1.0)
   {
      vecMidPoint = tr.vecEndPos;
      vecMidPoint.z = tr.pHit->v.absmin.z;
      vecMidPoint.z--;
   }
...but if tr.pHit is the worldspawn entity, the tr.pHit->v.absmin.z will just be zero. so this may be wrong code.
Perhaps you need to change this part of code back to the original HLSDK one (looks like CF has modified the two VecCheckxxxx() functions)
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#29)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: podbot grenade throwing bug - 13-07-2004

yea, this code looks somewhat mistaken to me.

I would think of
Code:
   // get a rough idea of how high it can be thrown
   vecMidPoint = vecSpot1 + (VecSpot2 - VecSpot1) * 0.5;
   TRACE_HULL (vecMidPoint, vecMidPoint + Vector (0, 0, 500), ignore_monsters, head_hull, pEdict, &tr);
   vecMidPoint = tr.vecEndPos;
   vecMidPoint.z--;
as the right code.

TRACE_HULL because a TraceLine would pass through the sky meshes whereas the grenade would bounce on it

And checking for flFraction is a bug since IF the grenade can actually reach 500 ft high (which is not that high in fact), then vecMidPoint would be left lined up with vecSpot1 and vecSpot2, which is NOT something we want, definitely.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: podbot grenade throwing bug
Old
  (#30)
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: podbot grenade throwing bug - 02-10-2004

I think I've found a good way for nade throwing
NOTE: PHP tags because code tags are currently broken..
Code:
   // get a rough idea of how high it can be thrown
   vecMidPoint = vecSpot1 + (vecSpot2 - vecSpot1) * 0.5;
   TRACE_HULL (vecMidPoint, vecMidPoint + Vector (0, 0, 500), ignore_monsters, head_hull, pEdict, &tr);
   if (tr.flFraction != 1.0)
   {
      vecMidPoint = vecMidPoint + (tr.vecEndPos - vecMidPoint) * 0.75;
   }

Last edited by sPlOrYgOn; 18-10-2004 at 09:56..
  
Reply With Quote
Reply


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

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