v1.0.9.0 (2nd hotfix)
This commit is contained in:
@@ -801,6 +801,7 @@ namespace Barotrauma
|
|||||||
IEnumerable<GUITextBox> GetAndSortTextBoxes(GUIComponent parent) => parent.GetAllChildren<GUITextBox>().OrderBy(t => t.Rect.Y).ThenBy(t => t.Rect.X);
|
IEnumerable<GUITextBox> GetAndSortTextBoxes(GUIComponent parent) => parent.GetAllChildren<GUITextBox>().OrderBy(t => t.Rect.Y).ThenBy(t => t.Rect.X);
|
||||||
GUITextBox SelectNextTextBox(GUIListBox listBox)
|
GUITextBox SelectNextTextBox(GUIListBox listBox)
|
||||||
{
|
{
|
||||||
|
if (listBox?.SelectedComponent == null) { return null; }
|
||||||
var textBoxes = GetAndSortTextBoxes(listBox.SelectedComponent);
|
var textBoxes = GetAndSortTextBoxes(listBox.SelectedComponent);
|
||||||
if (textBoxes.Any())
|
if (textBoxes.Any())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace Barotrauma.Lights
|
|||||||
{
|
{
|
||||||
foreach (LightSource light in lights)
|
foreach (LightSource light in lights)
|
||||||
{
|
{
|
||||||
light.NeedsHullCheck = true;
|
light.HullsUpToDate.Clear();
|
||||||
light.NeedsRecalculation = true;
|
light.NeedsRecalculation = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,9 +222,10 @@ namespace Barotrauma.Lights
|
|||||||
private float prevCalculatedRange;
|
private float prevCalculatedRange;
|
||||||
private Vector2 prevCalculatedPosition;
|
private Vector2 prevCalculatedPosition;
|
||||||
|
|
||||||
//do we need to recheck which convex hulls are within range
|
//Which submarines' convex hulls are up to date? Resets when the item moves/rotates relative to the submarine.
|
||||||
//(e.g. position or range of the lightsource has changed)
|
//Can contain null (means convex hulls that aren't part of any submarine).
|
||||||
public bool NeedsHullCheck = true;
|
public HashSet<Submarine> HullsUpToDate = new HashSet<Submarine>();
|
||||||
|
|
||||||
//do we need to recalculate the vertices of the light volume
|
//do we need to recalculate the vertices of the light volume
|
||||||
private bool needsRecalculation;
|
private bool needsRecalculation;
|
||||||
public bool NeedsRecalculation
|
public bool NeedsRecalculation
|
||||||
@@ -277,7 +278,7 @@ namespace Barotrauma.Lights
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NeedsHullCheck = true;
|
HullsUpToDate.Clear();
|
||||||
NeedsRecalculation = true;
|
NeedsRecalculation = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,7 +299,7 @@ namespace Barotrauma.Lights
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NeedsHullCheck = true;
|
HullsUpToDate.Clear();
|
||||||
NeedsRecalculation = true;
|
NeedsRecalculation = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -368,7 +369,7 @@ namespace Barotrauma.Lights
|
|||||||
lightSourceParams.Range = value;
|
lightSourceParams.Range = value;
|
||||||
if (Math.Abs(prevCalculatedRange - lightSourceParams.Range) < 10.0f) return;
|
if (Math.Abs(prevCalculatedRange - lightSourceParams.Range) < 10.0f) return;
|
||||||
|
|
||||||
NeedsHullCheck = true;
|
HullsUpToDate.Clear();
|
||||||
NeedsRecalculation = true;
|
NeedsRecalculation = true;
|
||||||
prevCalculatedRange = lightSourceParams.Range;
|
prevCalculatedRange = lightSourceParams.Range;
|
||||||
}
|
}
|
||||||
@@ -384,8 +385,8 @@ namespace Barotrauma.Lights
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
NeedsRecalculation = true;
|
NeedsRecalculation = true;
|
||||||
NeedsHullCheck = true;
|
|
||||||
lightTextureTargetSize = value;
|
lightTextureTargetSize = value;
|
||||||
|
HullsUpToDate.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -526,7 +527,7 @@ namespace Barotrauma.Lights
|
|||||||
chList.List.Add(convexHull);
|
chList.List.Add(convexHull);
|
||||||
}
|
}
|
||||||
chList.IsHidden.RemoveWhere(ch => !chList.List.Contains(ch));
|
chList.IsHidden.RemoveWhere(ch => !chList.List.Contains(ch));
|
||||||
NeedsHullCheck = false;
|
HullsUpToDate.Add(sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -571,7 +572,7 @@ namespace Barotrauma.Lights
|
|||||||
//light and the convexhulls are both outside
|
//light and the convexhulls are both outside
|
||||||
if (sub == null)
|
if (sub == null)
|
||||||
{
|
{
|
||||||
if (NeedsHullCheck)
|
if (!HullsUpToDate.Contains(null))
|
||||||
{
|
{
|
||||||
RefreshConvexHullList(chList, lightPos, null);
|
RefreshConvexHullList(chList, lightPos, null);
|
||||||
}
|
}
|
||||||
@@ -603,7 +604,7 @@ namespace Barotrauma.Lights
|
|||||||
//light and convexhull are both inside the same sub
|
//light and convexhull are both inside the same sub
|
||||||
if (sub == ParentSub)
|
if (sub == ParentSub)
|
||||||
{
|
{
|
||||||
if (NeedsHullCheck)
|
if (!HullsUpToDate.Contains(sub))
|
||||||
{
|
{
|
||||||
RefreshConvexHullList(chList, lightPos, sub);
|
RefreshConvexHullList(chList, lightPos, sub);
|
||||||
}
|
}
|
||||||
@@ -611,7 +612,7 @@ namespace Barotrauma.Lights
|
|||||||
//light and convexhull are inside different subs
|
//light and convexhull are inside different subs
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sub.DockedTo.Contains(ParentSub) && !NeedsHullCheck) { return; }
|
if (sub.DockedTo.Contains(ParentSub) && HullsUpToDate.Contains(sub)) { return; }
|
||||||
|
|
||||||
lightPos -= (sub.Position - ParentSub.Position);
|
lightPos -= (sub.Position - ParentSub.Position);
|
||||||
|
|
||||||
@@ -1385,9 +1386,9 @@ namespace Barotrauma.Lights
|
|||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
|
HullsUpToDate.Clear();
|
||||||
convexHullsInRange.Clear();
|
convexHullsInRange.Clear();
|
||||||
diffToSub.Clear();
|
diffToSub.Clear();
|
||||||
NeedsHullCheck = true;
|
|
||||||
NeedsRecalculation = true;
|
NeedsRecalculation = true;
|
||||||
|
|
||||||
vertexCount = 0;
|
vertexCount = 0;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma</Product>
|
<Product>Barotrauma</Product>
|
||||||
<Version>1.0.8.0</Version>
|
<Version>1.0.9.0</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>Barotrauma</AssemblyName>
|
<AssemblyName>Barotrauma</AssemblyName>
|
||||||
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma</Product>
|
<Product>Barotrauma</Product>
|
||||||
<Version>1.0.8.0</Version>
|
<Version>1.0.9.0</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>Barotrauma</AssemblyName>
|
<AssemblyName>Barotrauma</AssemblyName>
|
||||||
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma</Product>
|
<Product>Barotrauma</Product>
|
||||||
<Version>1.0.8.0</Version>
|
<Version>1.0.9.0</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>Barotrauma</AssemblyName>
|
<AssemblyName>Barotrauma</AssemblyName>
|
||||||
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma Dedicated Server</Product>
|
<Product>Barotrauma Dedicated Server</Product>
|
||||||
<Version>1.0.8.0</Version>
|
<Version>1.0.9.0</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>DedicatedServer</AssemblyName>
|
<AssemblyName>DedicatedServer</AssemblyName>
|
||||||
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma Dedicated Server</Product>
|
<Product>Barotrauma Dedicated Server</Product>
|
||||||
<Version>1.0.8.0</Version>
|
<Version>1.0.9.0</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>DedicatedServer</AssemblyName>
|
<AssemblyName>DedicatedServer</AssemblyName>
|
||||||
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma Dedicated Server</Product>
|
<Product>Barotrauma Dedicated Server</Product>
|
||||||
<Version>1.0.8.0</Version>
|
<Version>1.0.9.0</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2022</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>DedicatedServer</AssemblyName>
|
<AssemblyName>DedicatedServer</AssemblyName>
|
||||||
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
|
||||||
|
|||||||
@@ -482,8 +482,8 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
foreach (Item item in Inventory.AllItemsMod)
|
foreach (Item item in Inventory.AllItemsMod)
|
||||||
{
|
{
|
||||||
item.ApplyStatusEffects(ActionType.OnSuccess, 1.0f, ownerCharacter);
|
item.ApplyStatusEffects(ActionType.OnSuccess, 1.0f, ownerCharacter, useTarget: ownerCharacter);
|
||||||
item.ApplyStatusEffects(ActionType.OnUse, 1.0f, ownerCharacter);
|
item.ApplyStatusEffects(ActionType.OnUse, 1.0f, ownerCharacter, useTarget: ownerCharacter);
|
||||||
item.GetComponent<GeneticMaterial>()?.Equip(ownerCharacter);
|
item.GetComponent<GeneticMaterial>()?.Equip(ownerCharacter);
|
||||||
}
|
}
|
||||||
autoInjectCooldown = AutoInjectInterval;
|
autoInjectCooldown = AutoInjectInterval;
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (outpost.exitPoints.Any())
|
if (outpost.exitPoints.Any())
|
||||||
{
|
{
|
||||||
Rectangle worldBorders = Borders;
|
Rectangle worldBorders = GetDockedBorders();
|
||||||
worldBorders.Location += WorldPosition.ToPoint();
|
worldBorders.Location += WorldPosition.ToPoint();
|
||||||
foreach (var exitPoint in outpost.exitPoints)
|
foreach (var exitPoint in outpost.exitPoints)
|
||||||
{
|
{
|
||||||
@@ -425,18 +425,22 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static readonly HashSet<Submarine> checkSubmarineBorders = new HashSet<Submarine>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a rect that contains the borders of this sub and all subs docked to it
|
/// Returns a rect that contains the borders of this sub and all subs docked to it, excluding outposts
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Rectangle GetDockedBorders(List<Submarine> checkd = null)
|
public Rectangle GetDockedBorders()
|
||||||
{
|
{
|
||||||
if (checkd == null) { checkd = new List<Submarine>(); }
|
checkSubmarineBorders.Clear();
|
||||||
checkd.Add(this);
|
return GetDockedBordersRecursive();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Rectangle GetDockedBordersRecursive()
|
||||||
|
{
|
||||||
Rectangle dockedBorders = Borders;
|
Rectangle dockedBorders = Borders;
|
||||||
|
checkSubmarineBorders.Add(this);
|
||||||
var connectedSubs = DockedTo.Where(s => !checkd.Contains(s) && !s.Info.IsOutpost).ToList();
|
var connectedSubs = DockedTo.Where(s => !checkSubmarineBorders.Contains(s) && !s.Info.IsOutpost);
|
||||||
|
|
||||||
foreach (Submarine dockedSub in connectedSubs)
|
foreach (Submarine dockedSub in connectedSubs)
|
||||||
{
|
{
|
||||||
//use docking ports instead of world position to determine
|
//use docking ports instead of world position to determine
|
||||||
@@ -445,7 +449,7 @@ namespace Barotrauma
|
|||||||
Vector2? expectedLocation = CalculateDockOffset(this, dockedSub);
|
Vector2? expectedLocation = CalculateDockOffset(this, dockedSub);
|
||||||
if (expectedLocation == null) { continue; }
|
if (expectedLocation == null) { continue; }
|
||||||
|
|
||||||
Rectangle dockedSubBorders = dockedSub.GetDockedBorders(checkd);
|
Rectangle dockedSubBorders = dockedSub.GetDockedBordersRecursive();
|
||||||
dockedSubBorders.Location += MathUtils.ToPoint(expectedLocation.Value);
|
dockedSubBorders.Location += MathUtils.ToPoint(expectedLocation.Value);
|
||||||
|
|
||||||
dockedBorders.Y = -dockedBorders.Y;
|
dockedBorders.Y = -dockedBorders.Y;
|
||||||
@@ -477,8 +481,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
foreach (Submarine dockedSub in DockedTo)
|
foreach (Submarine dockedSub in DockedTo)
|
||||||
{
|
{
|
||||||
if (subs.Contains(dockedSub)) continue;
|
if (subs.Contains(dockedSub)) { continue; }
|
||||||
|
|
||||||
subs.Add(dockedSub);
|
subs.Add(dockedSub);
|
||||||
dockedSub.GetConnectedSubsRecursive(subs);
|
dockedSub.GetConnectedSubsRecursive(subs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,12 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
Config config = new Config
|
Config config = new Config
|
||||||
{
|
{
|
||||||
|
#if SERVER
|
||||||
|
//server defaults to English, clients get a prompt to select a language
|
||||||
Language = TextManager.DefaultLanguage,
|
Language = TextManager.DefaultLanguage,
|
||||||
|
#else
|
||||||
|
Language = LanguageIdentifier.None,
|
||||||
|
#endif
|
||||||
SubEditorUndoBuffer = 32,
|
SubEditorUndoBuffer = 32,
|
||||||
MaxAutoSaves = 8,
|
MaxAutoSaves = 8,
|
||||||
AutoSaveIntervalSeconds = 300,
|
AutoSaveIntervalSeconds = 300,
|
||||||
@@ -100,11 +105,13 @@ namespace Barotrauma
|
|||||||
Config retVal = fallback ?? GetDefault();
|
Config retVal = fallback ?? GetDefault();
|
||||||
|
|
||||||
retVal.DeserializeElement(element);
|
retVal.DeserializeElement(element);
|
||||||
|
#if SERVER
|
||||||
|
//server defaults to English, clients get a prompt to select a language
|
||||||
if (retVal.Language == LanguageIdentifier.None)
|
if (retVal.Language == LanguageIdentifier.None)
|
||||||
{
|
{
|
||||||
retVal.Language = TextManager.DefaultLanguage;
|
retVal.Language = TextManager.DefaultLanguage;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
retVal.Graphics = GraphicsSettings.FromElements(element.GetChildElements("graphicsmode", "graphicssettings"), retVal.Graphics);
|
retVal.Graphics = GraphicsSettings.FromElements(element.GetChildElements("graphicsmode", "graphicssettings"), retVal.Graphics);
|
||||||
retVal.Audio = AudioSettings.FromElements(element.GetChildElements("audio"), retVal.Audio);
|
retVal.Audio = AudioSettings.FromElements(element.GetChildElements("audio"), retVal.Audio);
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
v1.0.9.0
|
||||||
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Fixed crashing when you move from one textbox to another using tab and go past the last available textbox.
|
||||||
|
- Fixed inability to enter the final levels on some subs that include shuttles/drones.
|
||||||
|
- Fixed autoinjectors (PUCS, autoinjector headset) wasting the syringe without any effects on the character.
|
||||||
|
- Fixed bots failing to operate turrets in Typhon 1 due to them being partially inside the ceiling.
|
||||||
|
- Fixed lights going through walls in outposts.
|
||||||
|
- Fixed language selection prompt not showing up when launching the game for the first time.
|
||||||
|
- Fixed bots doing objectives during the roles tutorial, e.g. repairing the leaks for you.
|
||||||
|
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
v1.0.8.0
|
v1.0.8.0
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user