.:: 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 ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Some questions
Old
  (#1)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Some questions - 23-12-2004

I wonder is this thinks are same

Code:
 UTIL_TraceHull();
and
Code:
 TRACEHULL();
or
Code:
 UTIL_TraceLine();
and
Code:
 TRACELINE():
If someone can explain me.

Maybe in the future I will ask more questions in this Thread .
  
Reply With Quote
Re: Some questions
Old
  (#2)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Some questions - 23-12-2004

UTIL_TraceLine is used so we can catch the function call to it; in util.cpp you will see a UTIL_TraceLine function, you can grab stuff in there if you want, the UTIL_TraceLine function calls the engine traceline function whcih is equivalent to the TRACELINE you are talking about.

If you want to do a traceline by simply calling the engine function with no questions asked, use the TRACELINE macro.

the same goes for the TraceHull, there are several more examples of these besides TraceHull and TraceLine
  
Reply With Quote
Re: Some questions
Old
  (#3)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Some questions - 24-12-2004

Quote:
Originally Posted by Cheeseh
UTIL_TraceLine is used so we can catch the function call to it; in util.cpp you will see a UTIL_TraceLine function, you can grab stuff in there if you want, the UTIL_TraceLine function calls the engine traceline function whcih is equivalent to the TRACELINE you are talking about.

If you want to do a traceline by simply calling the engine function with no questions asked, use the TRACELINE macro.

the same goes for the TraceHull, there are several more examples of these besides TraceHull and TraceLine
OK thanks.
This is very usefull for me .
  
Reply With Quote
Re: Some questions
Old
  (#4)
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: Some questions - 24-12-2004

yes for UTIL_TraceHull ; yes and no for UTIL_TraceLine.

The second one also enables you to call TRACE_LINE with an overloaded parameter which is "ignore_glass". You can also call TRACE_LINE with this parameter explicitly (it's 0x100 I think) but you'll agree that it's more readable this way.

*edit* note to Cheeseh: the hook for tracelines is not in UTIL_TraceLine() but in g_engfuncs.pfnTraceLine(). That is not the same thing at all. UTIL_TraceLine() is just a convenient wrapper for the TraceLine engine function call.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 24-12-2004 at 00:30..
  
Reply With Quote
Re: Some questions
Old
  (#5)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Some questions - 24-12-2004

Thanks Pierre-Marie Baty.
Maybe some day I will understand how all functions in CS and HL work .
I hope it will be soon .
  
Reply With Quote
Re: Some questions
Old
  (#6)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Some questions - 24-12-2004

if you have MSVC then a quite useful option is rightclick and "goto reference" or "goto definition", that way you'd found out this ourself


  
Reply With Quote
Re: Some questions
Old
  (#7)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: Some questions - 24-12-2004

Quote:
Originally Posted by @$3.1415rin
if you have MSVC then a quite useful option is rightclick and "goto reference" or "goto definition", that way you'd found out this ourself
Yes I have MSVC and now is much more easy to find the definitions.
Thanks.
  
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