Quote:
Originally Posted by Cookies.net
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