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

@@ -404,7 +404,12 @@ namespace Barotrauma
public static void PlayUISound(GUISoundType soundType)
{
sounds[(int)soundType].Play();
if (sounds == null) return;
int soundIndex = (int)soundType;
if (soundIndex < 0 || soundIndex >= sounds.Length) return;
sounds[soundIndex].Play();
}
private static void DrawMessages(SpriteBatch spriteBatch, float deltaTime)

View File

@@ -40,9 +40,8 @@ namespace Barotrauma
box = new GUIFrame(rect, Color.DarkGray, null, this);
box.HoverColor = Color.Gray;
box.SelectedColor = Color.DarkGray;
text = new GUITextBlock(new Rectangle(rect.X + 40, rect.Y, 200, rect.Height), label, Color.Transparent, Color.White, Alignment.TopLeft, null, this);
text = new GUITextBlock(new Rectangle(rect.X + 30, rect.Y+2, 200, rect.Height), label, Color.Transparent, Color.White, Alignment.TopLeft, null, this);
this.rect = new Rectangle(box.Rect.X, box.Rect.Y, 240, rect.Height);