public static void WriteUintToPacket( uint value, CompressionInfo.UnsignedInteger compressionInfo) { MBAPI.IMBNetwork.WriteUintToPacket(value, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }
public static void WriteMBTeamReferenceToPacket( MBTeam value, CompressionInfo.Integer compressionInfo) { MBAPI.IMBNetwork.WriteIntToPacket(value.Index, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }
public static void WriteActionSetReferenceToPacket( MBActionSet actionSet, CompressionInfo.Integer compressionInfo) { MBAPI.IMBNetwork.WriteIntToPacket(actionSet.Index, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }
public static void WriteObjectReferenceToPacket( MBObjectBase value, CompressionInfo.UnsignedInteger compressionInfo) { MBAPI.IMBNetwork.WriteUintToPacket(value != null ? value.Id.InternalValue : 0U, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }
internal void Write() { DebugNetworkEventStatistics.StartEvent(this.GetType().Name, this.MessageId); if (GameNetwork.IsClientOrReplay) { GameNetworkMessage.WriteIntToPacket(this.MessageId, CompressionBasic.NetworkComponentEventTypeFromClientCompressionInfo); } else { GameNetworkMessage.WriteIntToPacket(this.MessageId, CompressionBasic.NetworkComponentEventTypeFromServerCompressionInfo); } this.OnWrite(); DebugNetworkEventStatistics.EndEvent(); }
public static void WriteBoolToPacket(bool value) { CompressionInfo.Integer compressionInfo = new CompressionInfo.Integer(0, 1); MBAPI.IMBNetwork.WriteIntToPacket(value ? 1 : 0, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }
public static void WriteNetworkPeerReferenceToPacket(NetworkCommunicator value) { MBAPI.IMBNetwork.WriteIntToPacket(value != null ? value.Index : -1, ref CompressionBasic.PlayerCompressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(CompressionBasic.PlayerCompressionInfo.GetNumBits()); }
public static void WriteVirtualPlayerReferenceToPacket(VirtualPlayer virtualPlayer) { MBAPI.IMBNetwork.WriteIntToPacket(virtualPlayer != null ? virtualPlayer.Index : -1, ref CompressionBasic.PlayerCompressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(CompressionBasic.PlayerCompressionInfo.GetNumBits()); }
public static void WriteAgentReferenceToPacket(Agent value) { CompressionInfo.Integer agentCompressionInfo = CompressionMission.AgentCompressionInfo; MBAPI.IMBNetwork.WriteIntToPacket(value != null ? value.Index : -1, ref agentCompressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(agentCompressionInfo.GetNumBits()); }
public static void WriteByteArrayToPacket(byte[] value, int offset, int size) { MBAPI.IMBNetwork.WriteByteArrayToPacket(value, offset, size); DebugNetworkEventStatistics.AddDataToStatistic(Math.Min(size, 1024) + 10); }
public static void WriteFloatToPacket(float value, CompressionInfo.Float compressionInfo) { MBAPI.IMBNetwork.WriteFloatToPacket(value, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }
public static void WriteLongToPacket(long value, CompressionInfo.LongInteger compressionInfo) { MBAPI.IMBNetwork.WriteLongToPacket(value, ref compressionInfo); DebugNetworkEventStatistics.AddDataToStatistic(compressionInfo.GetNumBits()); }