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

@ -3937,7 +3937,7 @@ void Player::updateActionThread()
if( gClientContainer.castRay( Point3F( pos.x, pos.y, pos.z + 0.01f ),
Point3F( pos.x, pos.y, pos.z - 2.0f ),
STATIC_COLLISION_TYPEMASK | VehicleObjectType, &rInfo ) )
(U32)STATIC_COLLISION_TYPEMASK | (U32)VehicleObjectType, &rInfo ) )
{
Material* material = ( rInfo.material ? dynamic_cast< Material* >( rInfo.material->getMaterial() ) : 0 );
@ -5562,7 +5562,7 @@ void Player::setTransform(const MatrixF& mat)
mat.getColumn(3,&pos);
Point3F rot(0.0f, 0.0f, -mAtan2(-vec.x,vec.y));
setPosition(pos,rot);
setMaskBits(MoveMask | NoWarpMask);
setMaskBits((U32)MoveMask | (U32)NoWarpMask);
}
void Player::getEyeTransform(MatrixF* mat)
@ -7073,7 +7073,7 @@ void Player:: playImpactSound()
if( gClientContainer.castRay( Point3F( pos.x, pos.y, pos.z + 0.01f ),
Point3F( pos.x, pos.y, pos.z - 2.0f ),
STATIC_COLLISION_TYPEMASK | VehicleObjectType,
(U32)STATIC_COLLISION_TYPEMASK | (U32)VehicleObjectType,
&rInfo ) )
{
Material* material = ( rInfo.material ? dynamic_cast< Material* >( rInfo.material->getMaterial() ) : 0 );