private void MergeUserCmd(PlayerEntity player)
        {
            var tempList = player.userCmd.UserCmdStepList;


            UserCmd last = UserCmd.Allocate();

            last.ReInit();

            ((UserCmd)tempList.Last()).CopyTo(last);
            last.Seq           = _userCmdSeq++;
            last.FrameInterval = 0;
            last.DeltaYaw      = 0;
            last.DeltaPitch    = 0;

            foreach (var cmd in tempList)
            {
                last.DeltaYaw      += cmd.DeltaYaw;
                last.DeltaPitch    += cmd.DeltaPitch;
                last.FrameInterval += cmd.FrameInterval;
                last.Buttons       |= cmd.Buttons;
                last.RenderTime     = cmd.RenderTime;
                last.ClientTime     = cmd.ClientTime;
                last.SnapshotId     = cmd.SnapshotId;
                last.PredicatedOnce = cmd.PredicatedOnce;
                last.MoveHorizontal = cmd.MoveHorizontal;
                last.MoveVertical   = cmd.MoveVertical;
                last.MoveUpDown     = cmd.MoveUpDown;

                last.ChangedSeat       = cmd.ChangedSeat > 0 ? cmd.ChangedSeat : last.ChangedSeat;
                last.ChangeChannel     = cmd.ChangeChannel > 0 ? cmd.ChangeChannel : last.ChangeChannel;
                last.CurWeapon         = cmd.CurWeapon == 0 ? last.CurWeapon : cmd.CurWeapon;
                last.ManualPickUpEquip = cmd.ManualPickUpEquip > 0 ? cmd.ManualPickUpEquip : last.ManualPickUpEquip;
                last.AutoPickUpEquip   = UserCmd.CopyList(last.AutoPickUpEquip, cmd.AutoPickUpEquip);
                last.UseEntityId       = cmd.UseEntityId > 0 ? cmd.UseEntityId : last.UseEntityId;
                last.UseVehicleSeat    = cmd.UseVehicleSeat > 0 ? cmd.UseVehicleSeat : last.UseVehicleSeat;
                last.UseType           = cmd.UseType > 0 ? cmd.UseType : last.UseType;
                last.BagIndex          = cmd.BagIndex > 0 ? cmd.BagIndex : last.BagIndex;

                //_logger.ErrorFormat("cmd;{0}   {1}",cmd.CurWeapon,last.CurWeapon);
                cmd.ReleaseReference();
            }

            tempList.Clear();

            player.userCmd.AddLatest(last);

            last.ReleaseReference();
        }