![]() |
Some questions
I wonder is this thinks are same
Code:
UTIL_TraceHull(); Code:
TRACEHULL(); Code:
UTIL_TraceLine(); Code:
TRACELINE(): Maybe in the future I will ask more questions in this Thread :). |
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 |
Re: Some questions
Quote:
This is very usefull for me :). |
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. |
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 :). |
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 :)
|
Re: Some questions
Quote:
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.