diff --git a/Subsurface/Properties/AssemblyInfo.cs b/Subsurface/Properties/AssemblyInfo.cs index b91a094b2..c5657d643 100644 --- a/Subsurface/Properties/AssemblyInfo.cs +++ b/Subsurface/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.4.1.0")] -[assembly: AssemblyFileVersion("0.4.1.0")] +[assembly: AssemblyVersion("0.4.1.3")] +[assembly: AssemblyFileVersion("0.4.1.3")] diff --git a/Subsurface/Source/DebugConsole.cs b/Subsurface/Source/DebugConsole.cs index 207edfa6d..d6d5ffd54 100644 --- a/Subsurface/Source/DebugConsole.cs +++ b/Subsurface/Source/DebugConsole.cs @@ -606,7 +606,7 @@ namespace Barotrauma try { - var textBlock = new GUITextBlock(new Rectangle(0, 0, 0, 0), msg, GUI.Style, Alignment.TopLeft, Alignment.Left, null, true, GUI.SmallFont); + var textBlock = new GUITextBlock(new Rectangle(0, 0, listBox.Rect.Width, 0), msg, GUI.Style, Alignment.TopLeft, Alignment.Left, null, true, GUI.SmallFont); textBlock.CanBeFocused = false; textBlock.TextColor = color; diff --git a/Subsurface/Source/Map/Levels/CaveGenerator.cs b/Subsurface/Source/Map/Levels/CaveGenerator.cs index 6452122ae..0602aa5e6 100644 --- a/Subsurface/Source/Map/Levels/CaveGenerator.cs +++ b/Subsurface/Source/Map/Levels/CaveGenerator.cs @@ -281,6 +281,8 @@ namespace Barotrauma int currentTargetIndex = 1; + int iterationsLeft = cells.Count; + do { int edgeIndex = 0; @@ -325,13 +327,15 @@ namespace Barotrauma currentCell.CellType = CellType.Path; pathCells.Add(currentCell); + iterationsLeft--; + if (currentCell == targetCells[currentTargetIndex]) { currentTargetIndex += 1; if (currentTargetIndex >= targetCells.Count) break; } - } while (currentCell != targetCells[targetCells.Count - 1]); + } while (currentCell != targetCells[targetCells.Count - 1] && iterationsLeft > 0); Debug.WriteLine("gettooclose: " + sw2.ElapsedMilliseconds + " ms"); diff --git a/Subsurface/Source/Map/Map/Map.cs b/Subsurface/Source/Map/Map/Map.cs index eda9c03a5..bef123f48 100644 --- a/Subsurface/Source/Map/Map/Map.cs +++ b/Subsurface/Source/Map/Map/Map.cs @@ -380,10 +380,10 @@ namespace Barotrauma { if (mission !=null && mission.Completed) missionsCompleted++; - int seed = (int)locations[0].MapPosition.X + (int)locations[0].MapPosition.Y * 100; - seed += (int)locations[1].MapPosition.X*10000 + (int)locations[1].MapPosition.Y * 1000000; + long seed = (long)locations[0].MapPosition.X + (long)locations[0].MapPosition.Y * 100; + seed += (long)locations[1].MapPosition.X*10000 + (long)locations[1].MapPosition.Y * 1000000; - MTRandom rand = new MTRandom(seed + missionsCompleted); + MTRandom rand = new MTRandom((int)((seed + missionsCompleted) % int.MaxValue)); if (rand.NextDouble() < 0.3f) return null; diff --git a/Subsurface/Source/Networking/GameServer.cs b/Subsurface/Source/Networking/GameServer.cs index a539ce4c1..da7c5232b 100644 --- a/Subsurface/Source/Networking/GameServer.cs +++ b/Subsurface/Source/Networking/GameServer.cs @@ -452,7 +452,7 @@ namespace Barotrauma.Networking if (characterInfo != null) { outmsg.Write(characterInfo.Name); - outmsg.Write(-1); + outmsg.Write((byte)0); } var subs = GameMain.NetLobbyScreen.GetSubList(); @@ -474,8 +474,6 @@ namespace Barotrauma.Networking //send the message to everyone except the client who just logged in SendMessage(outmsg, NetDeliveryMethod.ReliableUnordered, inc.SenderConnection); - UpdateVoteStatus(); - AddChatMessage(sender.name + " has joined the server", ChatMessageType.Server); } } @@ -590,6 +588,7 @@ namespace Barotrauma.Networking break; case (byte)PacketTypes.RequestNetLobbyUpdate: UpdateNetLobby(null, null); + UpdateVoteStatus(); break; case (byte)PacketTypes.SpectateRequest: if (gameStarted && allowSpectating) @@ -1712,7 +1711,7 @@ namespace Barotrauma.Networking foreach (Client c in clients) { int index = c.jobPreferences.FindIndex(jp => jp == job); - if (index == -1) index = 1000; + if (index == 0) index = 1000; if (preferredClient == null || index < bestPreference) { bestPreference = index; diff --git a/Subsurface/Source/Screens/NetLobbyScreen.cs b/Subsurface/Source/Screens/NetLobbyScreen.cs index e6bc0802b..6bf25e24c 100644 --- a/Subsurface/Source/Screens/NetLobbyScreen.cs +++ b/Subsurface/Source/Screens/NetLobbyScreen.cs @@ -1058,6 +1058,15 @@ namespace Barotrauma "Do you want to download the file from the server host?" : "Do you want to download the file and cancel downloading ''" + GameMain.Client.ActiveFileTransferName + "''?"; + if (GUIMessageBox.MessageBoxes.Count>0) + { + var currentMessageBox = GUIMessageBox.MessageBoxes.Peek(); + if (currentMessageBox != null && currentMessageBox.UserData as string == subName) + { + return false; + } + } + var requestFileBox = new GUIMessageBox("Submarine not found!", errorMsg+downloadMsg, new string[] { "Yes", "No" }, 400, 300); requestFileBox.Buttons[0].UserData = subName; requestFileBox.Buttons[0].OnClicked += requestFileBox.Close; diff --git a/Subsurface/Source/Sounds/OggStream.cs b/Subsurface/Source/Sounds/OggStream.cs index a7451a524..d2c9a5a7a 100644 --- a/Subsurface/Source/Sounds/OggStream.cs +++ b/Subsurface/Source/Sounds/OggStream.cs @@ -535,7 +535,7 @@ namespace Barotrauma.Sounds } catch { - continue; + finished = true; } if (finished) diff --git a/Subsurface/changelog.txt b/Subsurface/changelog.txt index 5782a22ed..3153e4582 100644 --- a/Subsurface/changelog.txt +++ b/Subsurface/changelog.txt @@ -1,3 +1,43 @@ +--------------------------------------------------------------------------------------------------------- +v0.4.1.3 +--------------------------------------------------------------------------------------------------------- + +- fixed errors when updating the submarine list if the host is has selected the "play yourself" option + +--------------------------------------------------------------------------------------------------------- +v0.4.1.2 +--------------------------------------------------------------------------------------------------------- + +- fixed the ''queue empty'' error messages when attempting to download a sub from the server + +--------------------------------------------------------------------------------------------------------- +v0.4.1.1 +--------------------------------------------------------------------------------------------------------- + +- changes to connection panel layout: less wire overlap, making it easier to select individual wires + +- fixed missions not appearing in single player + +- clients see the submarines the host has instead of their own subs in the server lobby +- clients can vote for subs they don't have +- servers check whether all the clients have the selected submarine file before starting a round, and if not, +give them some time to start downloading it + +- item sprites are visible in fabricator menus +- some new wall sprites +- fixed small walls being impossible to fix after they've broken +- ruin walls look slightly different from normal walls on sonar +- cargo is placed at the cargo spawnpoint instead of a random position within the hull it's inside +- fixed light emitted by flares not disappearing after the flare burns out +- flares won't stop burning if picked up and placed in the inventory +- minor changes to the lighting - small lights aren't ''skewed'' +- fixed the ''CastShadows'' parameter of light components not being saved +- fixed fires using up all the sound channels and preventing other sounds from playing + +- fixed the ''blood overlay'' still being visible when starting a new round or switching characters +- fixed fractal guardians occasionally killing themselves by slamming against the walls +- enemies use pathfinding inside the submarine + --------------------------------------------------------------------------------------------------------- v0.4.1.0 ---------------------------------------------------------------------------------------------------------