- fixed camera "twitching" when trying to move it above the upper limit of the level
- fixed duplicate hulls/gaps being placed at docking ports when saving and loading - fixed linkedsubmarines moving when saving and reloading if the center of the wall vertices isn't he same as the center of the sub - moving docked submarines along with the main sub when syncing the position - characters are killed when the client controlling them disconnects (+ cause of death: disconnected) - fixed the description box in server lobby
This commit is contained in:
@@ -342,14 +342,14 @@ namespace Barotrauma
|
||||
|
||||
private void DrawSubmarineIndicator(SpriteBatch spriteBatch, Submarine submarine)
|
||||
{
|
||||
Vector2 subDiff = submarine.WorldPosition - cam.Position;
|
||||
Vector2 subDiff = submarine.WorldPosition - cam.WorldViewCenter;
|
||||
|
||||
if (Math.Abs(subDiff.X) > cam.WorldView.Width || Math.Abs(subDiff.Y) > cam.WorldView.Height)
|
||||
{
|
||||
Vector2 normalizedSubDiff = Vector2.Normalize(subDiff);
|
||||
|
||||
Vector2 iconPos =
|
||||
cam.WorldToScreen(cam.Position) +
|
||||
cam.WorldToScreen(cam.WorldViewCenter) +
|
||||
new Vector2(normalizedSubDiff.X * GameMain.GraphicsWidth * 0.4f, -normalizedSubDiff.Y * GameMain.GraphicsHeight * 0.4f);
|
||||
|
||||
GUI.SubmarineIcon.Draw(spriteBatch, iconPos, Color.LightBlue * 0.5f);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Barotrauma
|
||||
private GUITickBox autoRestartBox;
|
||||
|
||||
public bool IsServer;
|
||||
public string ServerName, ServerMessage;
|
||||
public string ServerName;
|
||||
|
||||
const float NetworkUpdateInterval = 1.0f;
|
||||
private float networkUpdateTimer;
|
||||
@@ -95,10 +95,6 @@ namespace Barotrauma
|
||||
{
|
||||
return ServerName;
|
||||
}
|
||||
public string GetServerMessage()
|
||||
{
|
||||
return ServerMessage;
|
||||
}
|
||||
|
||||
public List<JobPrefab> JobPreferences
|
||||
{
|
||||
@@ -308,7 +304,6 @@ namespace Barotrauma
|
||||
|
||||
serverMessage = new GUITextBox(new Rectangle(0, 30, 360, 70), null, null, Alignment.TopLeft, Alignment.TopLeft, GUI.Style, infoFrame);
|
||||
serverMessage.Wrap = true;
|
||||
serverMessage.TextGetter = GetServerMessage;
|
||||
serverMessage.OnTextChanged = UpdateServerMessage;
|
||||
|
||||
}
|
||||
@@ -686,7 +681,6 @@ namespace Barotrauma
|
||||
public bool UpdateServerMessage(GUITextBox textBox, string text)
|
||||
{
|
||||
if (GameMain.Server == null) return false;
|
||||
ServerMessage = text;
|
||||
valueChanged = true;
|
||||
|
||||
return true;
|
||||
@@ -1107,7 +1101,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
msg.Write(ServerName);
|
||||
msg.Write(ServerMessage);
|
||||
msg.Write(serverMessage.Text);
|
||||
|
||||
msg.WriteRangedInteger(0, 2, (int)GameMain.Server.TraitorsEnabled);
|
||||
|
||||
@@ -1147,7 +1141,7 @@ namespace Barotrauma
|
||||
md5Hash = msg.ReadString();
|
||||
|
||||
ServerName = msg.ReadString();
|
||||
ServerMessage = msg.ReadString();
|
||||
serverMessage.Text = msg.ReadString();
|
||||
|
||||
traitorsEnabled = (YesNoMaybe)msg.ReadRangedInteger(0, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user