Raised This Month: $ Target: $400
 0% 

[INC] Customflags 0.6 Beta


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-23-2012 , 15:04   Re: [INC] Customflags 0.6 Beta
Reply With Quote #1

Wow, looking at this topic again, I have no idea why I was using ^= HAS_MESSAGE to unset flags rather than &= ^HAS_MESSAGE

Quote:
Originally Posted by FaTony View Post
Not quite sure about the purpose of this. The only reason you would want to stack boolean states into 1 cell is when you are very low on memory and really really care about speed. But in this case, your interface is quite cumbersome. In my plugins, if I want to store a boolean state of client, I just do
PHP Code:
new bool:IsClientBlahBlah[MAXPLAYERS 1]; 
Well, if you want to pass them to a function or native, then you'd want to use flags like this. Also, it can get kind of messy when you're dealing with a bunch of related booleans. Doesn't help that bool is still a cell, so 4 bytes per entry.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-23-2012 at 15:08.
Powerlord 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:43.


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