add safeties for enum math across define boundaries

This commit is contained in:
AzaezelX 2023-04-26 22:27:35 -05:00
parent 1230d0d280
commit aa02e48c8d
20 changed files with 71 additions and 71 deletions

View file

@ -691,7 +691,7 @@ void Lightning::processEvent(LightningStrikeEvent* pEvent)
start.z = mObjScale.z * 0.5f + getPosition().z;
strikePoint.z += -mObjScale.z * 0.5f;
bool rayHit = gClientContainer.castRay( start, strikePoint,
(STATIC_COLLISION_TYPEMASK | WaterObjectType),
((U32)STATIC_COLLISION_TYPEMASK | (U32)WaterObjectType),
&rayInfo);
if( rayHit )
{
@ -933,7 +933,7 @@ U32 Lightning::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
U32 retMask = Parent::packUpdate(con, mask, stream);
// Only write data if this is the initial packet or we've been inspected.
if (stream->writeFlag(mask & (InitialUpdateMask | ExtendedInfoMask)))
if (stream->writeFlag(mask & ((U32)InitialUpdateMask | (U32)ExtendedInfoMask)))
{
// Initial update
mathWrite(*stream, getPosition());