(b05f3e3d1) Fixed: Flood check logic
This commit is contained in:
@@ -601,8 +601,7 @@ namespace Barotrauma
|
||||
{
|
||||
((GUIMessageBox)GUIMessageBox.VisibleBox).Close();
|
||||
}
|
||||
else if ((Character.Controlled?.SelectedConstruction == null || !Character.Controlled.SelectedConstruction.ActiveHUDs.Any(ic => ic.GuiFrame != null))
|
||||
&& Inventory.SelectedSlot == null && CharacterHealth.OpenHealthWindow == null)
|
||||
else if ((GUI.MouseOn == null || GUI.IsMouseOn(GUI.PauseMenu)) && Inventory.SelectedSlot == null && CharacterHealth.OpenHealthWindow == null)
|
||||
{
|
||||
// Otherwise toggle pausing, unless another window/interface is open.
|
||||
GUI.TogglePauseMenu();
|
||||
|
||||
@@ -655,6 +655,16 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
private bool IsFlooding()
|
||||
{
|
||||
foreach (Gap gap in Gap.GapList)
|
||||
{
|
||||
if (gap.Submarine.IsOutpost) continue;
|
||||
if (gap.ConnectedWall == null || gap.IsRoomToRoom) continue;
|
||||
if (gap.ConnectedDoor != null || gap.Open <= 0.0f) continue;
|
||||
if (gap.Submarine == null) continue;
|
||||
if (gap.Submarine != Submarine.MainSub) continue;
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (Gap gap in Gap.GapList)
|
||||
{
|
||||
if (gap.ConnectedWall == null) continue;
|
||||
|
||||
@@ -88,7 +88,6 @@ namespace Barotrauma
|
||||
Gap.UpdateHulls();
|
||||
}
|
||||
|
||||
OxygenPercentage = prevOxygenPercentage;
|
||||
surface = drawSurface = rect.Y - rect.Height + WaterVolume / rect.Width;
|
||||
Pressure = surface;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user