Raised This Month: $ Target: $400
 0% 

what about optimizing it?lol


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2009 , 14:52   Re: what about optimizing it?lol
Reply With Quote #2

PHP Code:
switch (g_level[attacker])
{
    case (
1): SetHamParamFloat(4damage)
    
// . . . 
    
case (20): SetHamParamFloat(4damage*3.0)



PHP Code:
new const Float:damage_factor[LEVELS] = { 1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.9,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,3.0 }

SetHamParamFloat(4,damage damage_factor[g_level[attacker]])) 

I'm not 100% on this but I think I've seen optimizations like this before.
You could do something similar with weapon damage factor.
__________________

Last edited by fysiks; 05-10-2009 at 14:58.
fysiks 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 01:36.


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