Raised This Month: $ Target: $400
 0% 

[L4D] Ability type detection. Which way is faster?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
olj
Veteran Member
Join Date: Jun 2009
Old 09-22-2009 , 04:21   Re: [L4D] Ability type detection. Which way is faster?
Reply With Quote #4

Quote:
Originally Posted by Frus View Post
Well, hooking ability_use fires every time an ability is used, and causes code to run, so it's definitely not the most efficient.

The net prop will be faster than the model, as you are dealing with an integer, instead of having to compare a string (which the model will do).

So the net prop wins, if I had to say so.
Well, i can say that we need to hook ability_use anyway. So all 3 cases would be processed every time event fires. I agree that getting integer is faster - but we need to peek in object's property, and in case of event key we need to check predefined event key.

So, yes GetClientModel requires to compare string, which is slower than other 2 cases. But i doubt that getting property is much faster than getting event key. Anyway, thanx for replies
__________________
olj 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 04:02.


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