/// <summary> /// /// </summary> /// <param name="packet"></param> /// <param name="bUpdatingSelf"></param> private void WriteUpdateMaskForValueUpdate(Packet packet) { UpdateMask updateMask = this.PlayerField.PrivateUpdateMask; updateMask.WriteToPacked(packet); for (int iIndex = 0; iIndex <= this.PlayerField.PrivateUpdateMask.HighestUpdatedIndex; iIndex++) { if (updateMask.GetBit(iIndex) == true) { packet.WriterStream.Write((uint)this.PlayerField.UpdateValues[iIndex].UInt32); } } }
/// <summary> /// /// </summary> /// <param name="packet"></param> /// <param name="bUpdatingSelf"></param> private void WriteUpdateMaskForCreation(Packet packet) { UpdateMask updateMask = new UpdateMask(this.PlayerField.PrivateUpdateMask.Blocks); for (int iIndex = 0; iIndex < this.PlayerField.UpdateValues.Length; iIndex++) { if (this.PlayerField.UpdateValues[iIndex].UInt32 != 0) { updateMask.SetBit(iIndex); } } updateMask.WriteToPacked(packet); for (int iIndex = 0; iIndex <= updateMask.HighestUpdatedIndex; iIndex++) { if (updateMask.GetBit(iIndex) == true) { packet.WriterStream.Write((uint)this.PlayerField.UpdateValues[iIndex].UInt32); } } }