- converting NetworkEvent sending time to local time before doing any comparisons

- using mersenne twister for random number generation due to differences in Mono and .NET implementations of the Random library
- password prompt for password-protected private servers
- fixed deconstructor, fabricator and railgun connection panels closing immediately after opening
- fixed editor saving newly created subs to the root folder instead of the Submarines folder
- keeping items in the same inventory slots between clients instead of just syncing which items are in the inventory
- fixed crashing when swapping items between different limbslots
This commit is contained in:
Regalis
2016-03-03 21:11:54 +02:00
parent 35c36d283a
commit 40714c1102
21 changed files with 225 additions and 59 deletions
@@ -293,17 +293,22 @@ namespace Barotrauma
return false;
}
CoroutineManager.StartCoroutine(JoinServer(ip));
CoroutineManager.StartCoroutine(ConnectToServer(ip, serverList.Selected != null && (serverList.Selected.GetChild("password") as GUITickBox).Selected));
return true;
}
private IEnumerable<object> JoinServer(string ip)
public void JoinServer(string ip, bool hasPassword)
{
CoroutineManager.StartCoroutine(ConnectToServer(ip, hasPassword));
}
private IEnumerable<object> ConnectToServer(string ip, bool hasPassword)
{
string selectedPassword = "";
if (serverList.Selected!=null && (serverList.Selected.GetChild("password") as GUITickBox).Selected)
if (hasPassword)
{
var msgBox = new GUIMessageBox("Password required:", "", new string[] { "OK", "Cancel" });
var passwordBox = new GUITextBox(new Rectangle(0,40,150,25), Alignment.TopLeft, GUI.Style, msgBox.children[0]);