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

How to use SetBits | ClearBits | FBitSet operations?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bos93
Veteran Member
Join Date: Jul 2010
Old 03-10-2013 , 16:56   How to use SetBits | ClearBits | FBitSet operations?
Reply With Quote #1

From hlsdk:

PHP Code:
#define SetBits(flBitVector, bits)    ((flBitVector) = (int)(flBitVector) | (bits))
#define ClearBits(flBitVector, bits)    ((flBitVector) = (int)(flBitVector) & ~(bits))
#define FBitSet(flBitVector, bit)        ((int)(flBitVector) & (bit)) 
But my friend says it's not correctly
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-10-2013 , 18:54   Re: How to use SetBits | ClearBits | FBitSet operations?
Reply With Quote #2

Quote:
Originally Posted by Bos93 View Post
From hlsdk:

PHP Code:
#define SetBits(flBitVector, bits)    ((flBitVector) = (int)(flBitVector) | (bits))
#define ClearBits(flBitVector, bits)    ((flBitVector) = (int)(flBitVector) & ~(bits))
#define FBitSet(flBitVector, bit)        ((int)(flBitVector) & (bit)) 
But my friend says it's not correctly
Ask your friend since he is so qualified to tell you that it's wrong. If he knows what is wrong then he knows how they work. However, I'm guessing it's not wrong.
__________________
fysiks is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-11-2013 , 02:24   Re: How to use SetBits | ClearBits | FBitSet operations?
Reply With Quote #3

It's by the Valve, OFC it's not wrong.
TheDS1337 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-11-2013 , 04:46   Re: How to use SetBits | ClearBits | FBitSet operations?
Reply With Quote #4

Code is clear enough i think... self explainative
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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 11:04.


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