private static void CommonProcess(IMyEntity entity, SyncEntityType syncType, Vector3 velocity, Vector3D position, MatrixD matrix)
        {
            if (entity == null)
            {
                return;
            }

            if (syncType.HasFlag(SyncEntityType.Stop))
            {
                entity.Stop();
            }

            // The Physics.LinearVelocity doesn't change the player speed quickly enough before SetPosition is called, as
            // the player will smack into the other obejct before it's correct velocity is actually registered.
            if (syncType.HasFlag(SyncEntityType.Velocity) && entity.Physics != null)
            {
                entity.Physics.LinearVelocity = velocity;
            }

            // The SetWorldMatrix doesn't rotate the player quickly enough before SetPosition is called, as
            // the player will bounce off objects before it's correct orentation is actually registered.
            if (syncType.HasFlag(SyncEntityType.Matrix))
            {
                entity.SetWorldMatrix(matrix);
            }

            if (syncType.HasFlag(SyncEntityType.Position))
            {
                entity.SetPosition(position);
            }
        }