(99feac023) Unstable 0.9.704.0
This commit is contained in:
@@ -364,15 +364,7 @@ namespace Barotrauma.Networking
|
||||
updateInterval = new TimeSpan(0, 0, 0, 0, 150);
|
||||
|
||||
CoroutineManager.StartCoroutine(WaitForStartingInfo(), "WaitForStartingInfo");
|
||||
}
|
||||
|
||||
private bool RetryConnection(GUIButton button, object obj)
|
||||
{
|
||||
if (clientPeer != null) { clientPeer.Close(); }
|
||||
clientPeer = null;
|
||||
ConnectToServer(serverEndpoint, serverName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private bool ReturnToPreviousMenu(GUIButton button, object obj)
|
||||
{
|
||||
@@ -850,13 +842,14 @@ namespace Barotrauma.Networking
|
||||
disconnectReason == DisconnectReason.ExcessiveDesyncOldEvent ||
|
||||
disconnectReason == DisconnectReason.ExcessiveDesyncRemovedEvent ||
|
||||
disconnectReason == DisconnectReason.SyncTimeout;
|
||||
|
||||
|
||||
if (allowReconnect &&
|
||||
(disconnectReason == DisconnectReason.Unknown || eventSyncError))
|
||||
{
|
||||
if (eventSyncError)
|
||||
{
|
||||
GameMain.NetLobbyScreen.Select();
|
||||
GameMain.GameSession?.EndRound("");
|
||||
gameStarted = false;
|
||||
myCharacter = null;
|
||||
}
|
||||
@@ -1244,6 +1237,8 @@ namespace Barotrauma.Networking
|
||||
mirrorLevel: campaign.Map.CurrentLocation != campaign.Map.SelectedConnection.Locations[0]);
|
||||
}
|
||||
|
||||
GameMain.GameSession.Mission?.ClientReadInitial(inc);
|
||||
|
||||
if (GameMain.GameSession.Submarine.IsFileCorrupted)
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to start a round. Could not load the submarine \"{GameMain.GameSession.Submarine.Name}\".");
|
||||
@@ -1635,9 +1630,9 @@ namespace Barotrauma.Networking
|
||||
break;
|
||||
case ServerNetObject.ENTITY_POSITION:
|
||||
UInt16 id = inc.ReadUInt16();
|
||||
byte msgLength = inc.ReadByte();
|
||||
uint msgLength = inc.ReadVariableUInt32();
|
||||
|
||||
int msgEndPos = inc.BitPosition + msgLength * 8;
|
||||
int msgEndPos = (int)(inc.BitPosition + msgLength * 8);
|
||||
|
||||
var entity = Entity.FindEntityByID(id) as IServerSerializable;
|
||||
if (entity != null)
|
||||
@@ -2367,9 +2362,14 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
textBox.Deselect();
|
||||
}
|
||||
|
||||
textBox.Text = "";
|
||||
|
||||
if (ChatBox.CloseAfterMessageSent)
|
||||
{
|
||||
ChatBox.ToggleOpen = false;
|
||||
ChatBox.CloseAfterMessageSent = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2443,13 +2443,16 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
msgBox.AddToGUIUpdateList();
|
||||
ChatBox.GUIFrame.Flash(Color.DarkGreen, 0.5f);
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
ChatBox.ToggleOpen = true;
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
}
|
||||
|
||||
if (radioKeyHit)
|
||||
{
|
||||
msgBox.AddToGUIUpdateList();
|
||||
ChatBox.GUIFrame.Flash(Color.YellowGreen, 0.5f);
|
||||
ChatBox.CloseAfterMessageSent = !ChatBox.ToggleOpen;
|
||||
ChatBox.ToggleOpen = true;
|
||||
if (!msgBox.Text.StartsWith(ChatBox.RadioChatString))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user