misc optimization & refactoring

This commit is contained in:
Regalis
2015-09-29 18:03:38 +03:00
parent cc16bb3ad7
commit 45178e745b
30 changed files with 820 additions and 210 deletions

View File

@@ -436,9 +436,6 @@ namespace Subsurface.Networking
userID = inc.ReadInt32();
userPassword = inc.ReadString();
version = inc.ReadString();
#if DEBUG
version = GameMain.Version.ToString();
#endif
packageName = inc.ReadString();
packageHash = inc.ReadString();
name = inc.ReadString();
@@ -450,6 +447,8 @@ namespace Subsurface.Networking
return;
}
#if !DEBUG
if (userPassword != password)
{
inc.SenderConnection.Deny("Wrong password!");
@@ -481,6 +480,8 @@ namespace Subsurface.Networking
return;
}
#endif
//existing user re-joining
if (userID > 0)
{