.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Some questions (http://forums.bots-united.com/showthread.php?t=3263)

The Storm 23-12-2004 22:00

Some questions
 
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 :).

Cheeseh 23-12-2004 23:19

Re: Some questions
 
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

The Storm 24-12-2004 00:13

Re: Some questions
 
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 :).

Pierre-Marie Baty 24-12-2004 00:28

Re: Some questions
 
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.

The Storm 24-12-2004 00:50

Re: Some questions
 
Thanks Pierre-Marie Baty.
Maybe some day I will understand how all functions in CS and HL work :).
I hope it will be soon :).

@$3.1415rin 24-12-2004 10:36

Re: Some questions
 
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 :)

The Storm 24-12-2004 11:18

Re: Some questions
 
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.


All times are GMT +2. The time now is 00:49.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.