Quote:
Originally Posted by kristi
Shouldn't it be (damagebits & DMG_BULLET) ?
|
not really, read more about bitsums....
(damagebits & DMG_BULLET) its if damagebits contain 2 >> lets imagine thats damagebits carry this bitsum value which is 1111 and DMG_BULLET value its 2 which in bitsum its 0010
so the & operator works like this (1111 & 0010) will return this bitsum value 0010 which its 2.
and (damagebits == DMG_BULLET) this condition will only works when its only a bullet damage.
__________________