Raised This Month: $ Target: $400
 0% 

Get origin of player's hitboxes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-25-2009 , 08:25   Re: Get origin of player's hitboxes
Reply With Quote #9

The less natives calls you have ( amxx plugin -> module ) = the less cpu consuming it will be.

eg: You want to retrieve the hit and the hit origin.

Using engine :

Code:
new Float:Start[3]; new Float:End[3]; new Float:EndPos[3]; new Hit; [...] Hit = trace_line( -1, Start, End, EndPos );

Using fakemeta :

Code:
new Float:Start[3]; new Float:End[3]; new Float:EndPos[3]; new Hit; [...] engfunc( EngFunc_TraceLine, Start, End, DONT_IGNORE_MONSTERS, Ent, 0 ); Hit = get_tr2( 0, TR_pHit ); get_tr2( 0, TR_vecEndPos, EndPos );

Engine, you need one call, Fakemeta 3.
It's possible to see the difference using the profiler by sawce. But here the difference would not be really significant.
__________________

Last edited by Arkshine; 06-25-2009 at 08:29.
Arkshine is offline
 



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


All times are GMT -4. The time now is 15:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode