Added a null check for STW

Changed positions of notes
This commit is contained in:
NotAlwaysTrue
2026-04-30 22:35:30 +08:00
parent 02689d0d86
commit 8b6da6b033
2 changed files with 6 additions and 6 deletions

View File

@@ -656,6 +656,11 @@ namespace Barotrauma
List<Gap> gapList = Gap.GapList.ToList();
// This should never break again... right?
//update gaps in random order, because otherwise in rooms with multiple gaps
//the water/air will always tend to flow through the first gap in the list,
//which may lead to weird behavior like water draining down only through
//one gap in a room even if there are several
int n = gapList.Count;
while (n > 1)
{
@@ -685,11 +690,6 @@ namespace Barotrauma
});
},
() =>
//update gaps in random order, because otherwise in rooms with multiple gaps
//the water/air will always tend to flow through the first gap in the list,
//which may lead to weird behavior like water draining down only through
//one gap in a room even if there are several
// moved waterflow reset here to see if we can reduce at least some time
{
// PLEASE WORK

View File

@@ -87,7 +87,7 @@ namespace Barotrauma
{
try
{
action.Invoke();
action?.Invoke();
}
catch (Exception e)
{