Raised This Month: $ Target: $400
 0% 

[ H3LP ] Entity members


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 12-24-2017 , 14:14   Re: [ H3LP ] Entity members
Reply With Quote #1

Quote:
Originally Posted by CrazY. View Post
Basically this is a "hack" method, I was thinking of something like bit-fields, but even so, it was worth the try.
Basically this is what you have to use and there is no better solution. Using array of 2056 cells is painful. (Thats 8 kB of memory )

Bit-fields can only be used to store several boolean values (8) in a single byte. So you can't just store float numbers such as 100.0 in one bit. Also a variable can store up to 32 values (4 bytes * 8 bits = 32 boolean values) and that's the reason why often can be seen, bit-flags to be used for players instead of array of 32 cells.

Last edited by KiLLeR.; 12-24-2017 at 14:28.
KiLLeR. 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 23:20.


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