View Single Post
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 05-14-2010 , 10:11   Re: [TF2] The Amplifier
Reply With Quote #6

First and foremost, good job on the plugin. I really like the model and the idea (heck I even made something very similar based off of Jumento's idea :http://www.rtdgaming.com/index.php?topic=430.0)

Some things I noticed while glancing over the code...
Could of used GetVectorDistance instead of:
PHP Code:
Float:calcDistance(Float:x1,Float:x2,Float:y1,Float:y2,Float:z1,Float:z2){ 
    new 
Float:dx x1-x2;
    new 
Float:dy y1-y2;
    new 
Float:dz z1-z2;
    return(
SquareRoot(dx*dx dy*dy dz*dz));

PHP Code:
for(client=1;client<=GetClientCount();client++) 
Quote:
Originally Posted by DJ Tsunami View Post
using GetClientCount() in a for-loop might leave out clients. Use MaxClients instead.
This is nit-picking but I have used the "soldierbuff_red_buffed" particle in the past and players complained that it was laggy. So if you have a bunch of people near the Amp and they look at their feet FPS will go down for them
__________________

Last edited by FoxMulder; 05-14-2010 at 10:36.
FoxMulder is offline