Fixed password box not working, connecting powered items with multiple parallel wires works, velocity/depth indicators on nav, stuff

This commit is contained in:
Regalis
2016-02-18 21:09:10 +02:00
parent 4ad8105cd6
commit cd4e3a3d2a
20 changed files with 182 additions and 82 deletions

View File

@@ -41,6 +41,9 @@ namespace Barotrauma.Networking
endRoundButton.OnSelected = ToggleEndRoundVote;
endRoundButton.Visible = false;
newName = newName.Replace(":", "");
newName = newName.Replace(";", "");
GameMain.DebugDraw = false;
Hull.EditFire = false;
Hull.EditWater = false;

View File

@@ -39,6 +39,9 @@ namespace Barotrauma.Networking
public GameServer(string name, int port, bool isPublic = false, string password = "", bool attemptUPnP = false, int maxPlayers = 10)
{
name = name.Replace(":", "");
name = name.Replace(";", "");
this.name = name;
this.password = password;
@@ -1121,12 +1124,11 @@ namespace Barotrauma.Networking
int traitorIndex = Rand.Range(0, characters.Count);
int targetIndex = Rand.Range(0, characters.Count);
while (targetIndex==traitorIndex)
while (targetIndex == traitorIndex)
{
targetIndex = Rand.Range(0, characters.Count);
}
traitor = characters[traitorIndex];
target = characters[targetIndex];

View File

@@ -12,6 +12,8 @@ namespace Barotrauma.Networking
//UpdateEntity networkevents aren't sent to clients if they're further than this from the entity
public const float UpdateEntityDistance = 2500.0f;
public const int MaxPlayers = 16;
public static string MasterServerUrl = GameMain.Config.MasterServerUrl;
//if a Character is further than this from the sub, the server will ignore it