1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

Missing project added; various code cleanups

This commit is contained in:
lidgren
2010-05-14 17:12:26 +00:00
parent bf208b507a
commit 9577d4b4a6
31 changed files with 381 additions and 139 deletions

View File

@@ -208,36 +208,36 @@ namespace Lidgren.Network
/// <summary>
/// Enables receiving of the specified type of message
/// </summary>
public void EnableMessageType(NetIncomingMessageType tp)
public void EnableMessageType(NetIncomingMessageType type)
{
m_disabledTypes &= (~tp);
m_disabledTypes &= (~type);
}
/// <summary>
/// Disables receiving of the specified type of message
/// </summary>
public void DisableMessageType(NetIncomingMessageType tp)
public void DisableMessageType(NetIncomingMessageType type)
{
m_disabledTypes |= tp;
m_disabledTypes |= type;
}
/// <summary>
/// Enables or disables receiving of the specified type of message
/// </summary>
public void SetMessageTypeEnabled(NetIncomingMessageType tp, bool enabled)
public void SetMessageTypeEnabled(NetIncomingMessageType type, bool enabled)
{
if (enabled)
m_disabledTypes &= (~tp);
m_disabledTypes &= (~type);
else
m_disabledTypes |= tp;
m_disabledTypes |= type;
}
/// <summary>
/// Gets if receiving of the specified type of message is enabled
/// </summary>
public bool IsMessageTypeEnabled(NetIncomingMessageType tp)
public bool IsMessageTypeEnabled(NetIncomingMessageType type)
{
return !((m_disabledTypes & tp) == tp);
return !((m_disabledTypes & type) == type);
}
/// <summary>