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