Raised This Month: $51 Target: $400
 12% 

Efficientness.Set_user_bpammo.


Post New Thread Reply   
 
Thread Tools Display Modes
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 05-06-2009 , 00:35   Re: Efficientness.Set_user_bpammo.
Reply With Quote #11

idk, you may benchmark it. also keep in mind that this works, too.

PHP Code:
new Float:fVar Float:iVar 
this means adding is nonsense (i dont know whether the compiler will leave out adding 0 in calculations). float() needs a module call, the way in my post doesnt... think about which is faster ^^
(cant benchmark, my system crashes when i use the benchmark binary)
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-06-2009 , 01:47   Re: Efficientness.Set_user_bpammo.
Reply With Quote #12

You would have nothing to benchmark lol.
0.0 + iVar might be faster, i often use it but i could tell what is better.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 05-06-2009 , 01:59   Re: Efficientness.Set_user_bpammo.
Reply With Quote #13

Actually any math that involves floats and ints will call float() anyway, you can see that when disassembling plugins, with all the operator functions embedded in it.
__________________

Community / No support through PM
danielkza is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-06-2009 , 06:47   Re: Efficientness.Set_user_bpammo.
Reply With Quote #14

I hate floats xD... expecially when the values after the comma are not used... like health, damage, etc... anyway :} thanks for clearing that up
__________________
Hunter-Digital is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 05-06-2009 , 07:38   Re: Efficientness.Set_user_bpammo.
Reply With Quote #15

Quote:
Originally Posted by Hunter-Digital View Post
I hate floats xD... expecially when the values after the comma are not used... like health, damage
Actually it is used, but the game/plugins round the values, so you see the rounded version of your life and damage when you play.
__________________
O o
/¯________________________
| IMMA FIRIN' MAH LAZOR!!!
\_¯¯¯
Dores is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 05-06-2009 , 11:06   Re: Efficientness.Set_user_bpammo.
Reply With Quote #16

Quote:
Originally Posted by Dores View Post
Actually it is used, but the game/plugins round the values, so you see the rounded version of your life and damage when you play.
sometimes you hear a dmg soudn after falling without any change in the hud (hp will still be 100 if you refer to the hud) but in fact you lost 0.x hp.
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
Reply



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 07:07.


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