View Single Post
Tylerst
Veteran Member
Join Date: Oct 2010
Old 02-24-2011 , 12:28   Re: [TF2] Sentry Immunity
Reply With Quote #6

Quote:
Originally Posted by Cookies.net View Post
Looks cool so i decided to look at the source, and what i notice is this

PHP Code:
new flags GetEntityFlags(target_list[i])+(1<<16);
new 
flags GetEntityFlags(target_list[i])-(1<<16); 
im pretty sure that isn't a good way of dealing with it (+-)

i think this is what you should be using
PHP Code:
new flags GetEntityFlags(target_list[i])|(1<<16); // | instead of +
new flags GetEntityFlags(target_list[i])&~(1<<16); // &~ instead of - 

A fair suggestion, but out of curiousity, why does it matter?

Also, if I do use bitwise operators, shouldn't I use ^ instead of &~ ?

Just curious, If +- are going to cause a problem I'll change it but I'd like to know why it's a problem xD

Last edited by Tylerst; 02-24-2011 at 12:30.
Tylerst is offline