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
+6 -1
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)