Fixed PlayUISound crashing the launcher, generatic ladder waypoints, AICharacter sync bugfix, chatbox resizing according to resolution

This commit is contained in:
Regalis
2016-01-09 17:02:51 +02:00
parent 03f569b161
commit addd9dea5c
10 changed files with 92 additions and 30 deletions

View File

@@ -555,11 +555,8 @@ namespace Barotrauma.Networking
//int gameModeIndex = inc.ReadInt32();
GameMain.GameSession = new GameSession(GameMain.NetLobbyScreen.SelectedSub, "", gameMode);
yield return CoroutineStatus.Running;
GameMain.GameSession.StartShift(levelSeed);
yield return CoroutineStatus.Running;
//myCharacter = ReadCharacterData(inc);

View File

@@ -290,7 +290,7 @@ namespace Barotrauma.Networking
{
if (!(c is AICharacter) || c.IsDead) continue;
Vector2 diff = Submarine.Loaded.WorldPosition - c.WorldPosition;
Vector2 diff = c.WorldPosition-Submarine.Loaded.WorldPosition;
if (FarseerPhysics.ConvertUnits.ToSimUnits(diff.Length()) > NetConfig.CharacterIgnoreDistance) continue;

View File

@@ -104,17 +104,20 @@ namespace Barotrauma.Networking
inGameHUD = new GUIFrame(new Rectangle(0,0,0,0), null, null);
inGameHUD.CanBeFocused = false;
int width = 350, height = 100;
int width = (int)MathHelper.Clamp(GameMain.GraphicsWidth * 0.35f, 350, 500);
int height = (int)MathHelper.Clamp(GameMain.GraphicsHeight * 0.15f, 100, 200);
chatBox = new GUIListBox(new Rectangle(
GameMain.GraphicsWidth - 20 - width,
GameMain.GraphicsHeight - 40 - 25 - height,
width, height),
Color.White * 0.5f, GUI.Style, inGameHUD);
chatBox.Padding = Vector4.Zero;
chatMsgBox = new GUITextBox(
new Rectangle(chatBox.Rect.X, chatBox.Rect.Y + chatBox.Rect.Height + 20, chatBox.Rect.Width, 25),
Color.White * 0.5f, Color.Black, Alignment.TopLeft, Alignment.Left, GUI.Style, inGameHUD);
chatMsgBox.Font = GUI.SmallFont;
chatMsgBox.Padding = Vector4.Zero;
chatMsgBox.OnEnterPressed = EnterChatMessage;