Unstable 0.16.5.0

This commit is contained in:
Markus Isberg
2022-02-17 00:03:08 +09:00
parent 2190fe08ef
commit a0696ecb74
51 changed files with 197 additions and 96 deletions
@@ -406,6 +406,7 @@ namespace Barotrauma
if (npc.CampaignInteractionType == CampaignMode.InteractionType.None || npc.Submarine != character.Submarine || npc.IsDead || npc.IsIncapacitated) { continue; }
var iconStyle = GUI.Style.GetComponentStyle("CampaignInteractionIcon." + npc.CampaignInteractionType);
if (iconStyle == null) { continue; }
Range<float> visibleRange = new Range<float>(npc.CurrentHull == Character.Controlled.CurrentHull ? 500.0f : 100.0f, float.PositiveInfinity);
if (npc.CampaignInteractionType == CampaignMode.InteractionType.Examine)
{
@@ -956,7 +956,7 @@ namespace Barotrauma
public void DrawHUD(SpriteBatch spriteBatch)
{
if (GUI.DisableHUD) { return; }
if (GUI.DisableHUD || Character.Removed) { return; }
if (GameMain.GraphicsWidth != screenResolution.X ||
GameMain.GraphicsHeight != screenResolution.Y ||
Math.Abs(inventoryScale - Inventory.UIScale) > 0.01f ||
@@ -997,14 +997,16 @@ namespace Barotrauma
{
healthBar.RectTransform.ScreenSpaceOffset = healthBarShadow.RectTransform.ScreenSpaceOffset = Point.Zero;
}
// If manning a turret the portrait doesn't get rendered so we push the health bar to remove the empty gap
healthBarHolder.RectTransform.ScreenSpaceOffset = Character.ShouldLockHud() ? new Point(0, HUDLayoutSettings.PortraitArea.Height) : Point.Zero;
if (healthBarHolder != null)
{
// If manning a turret the portrait doesn't get rendered so we push the health bar to remove the empty gap
healthBarHolder.RectTransform.ScreenSpaceOffset = Character.ShouldLockHud() ? new Point(0, HUDLayoutSettings.PortraitArea.Height) : Point.Zero;
}
DrawStatusHUD(spriteBatch);
}
private (Affliction affliction, string text)? highlightedAfflictionIcon;
public void DrawStatusHUD(SpriteBatch spriteBatch)
{