(e0d673b0d) Test: Don't calculate the distance to the buttons when seeking path. Instead, check the distance when checking the doors. Allows the bots to access the Remora ballast through the door where the button is a bit farther from the door than usually.
This commit is contained in:
@@ -107,42 +107,24 @@ namespace Barotrauma
|
||||
|
||||
text = text.Replace("\n", " \n ");
|
||||
|
||||
List<string> words = new List<string>();
|
||||
string currWord = "";
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
string[] words;
|
||||
if (TextManager.NoWhiteSpace)
|
||||
{
|
||||
if (isCJK.IsMatch(text[i].ToString()))
|
||||
words = new string[text.Length];
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
if (currWord.Length > 0)
|
||||
{
|
||||
words.Add(currWord);
|
||||
currWord = "";
|
||||
}
|
||||
words.Add(text[i].ToString());
|
||||
}
|
||||
else if (text[i] == ' ')
|
||||
{
|
||||
if (currWord.Length > 0)
|
||||
{
|
||||
words.Add(currWord);
|
||||
currWord = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currWord += text[i];
|
||||
words[i] = text[i].ToString();
|
||||
}
|
||||
}
|
||||
if (currWord.Length > 0)
|
||||
else
|
||||
{
|
||||
words.Add(currWord);
|
||||
currWord = "";
|
||||
words = text.Split(' ');
|
||||
}
|
||||
|
||||
StringBuilder wrappedText = new StringBuilder();
|
||||
float linePos = 0f;
|
||||
Vector2 spaceSize = font.MeasureString(" ") * textScale;
|
||||
for (int i = 0; i < words.Count; ++i)
|
||||
for (int i = 0; i < words.Length; ++i)
|
||||
{
|
||||
if (words[i].Length == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user