Server list, lighting/los optimization

This commit is contained in:
Regalis
2015-08-07 23:10:12 +03:00
parent 08c5117e8f
commit 0937c30f15
45 changed files with 36611 additions and 41 deletions

View File

@@ -33,6 +33,8 @@ namespace Subsurface.Networking
{
public const int DefaultPort = 14242;
public static string MasterServerUrl = Game1.Config.MasterServerUrl;
protected static Color[] messageColor = { Color.White, Color.Red, Color.LightBlue, Color.LightGreen };
protected string name;
@@ -224,6 +226,15 @@ namespace Subsurface.Networking
public virtual void Disconnect() { }
public static int ByteToPlayerCount(byte byteVal, out int maxPlayers)
{
maxPlayers = (byteVal >> 4)+1;
int playerCount = byteVal & (byte)((1 << 4) - 1);
return playerCount;
}
}
enum ChatMessageType