Unstable 0.1400.8.0

This commit is contained in:
Markus Isberg
2021-08-13 17:52:45 +09:00
parent 47707c824a
commit 27dd9e6022
38 changed files with 183 additions and 113 deletions
@@ -205,9 +205,14 @@ namespace Barotrauma
{
foreach (Key key in keys)
{
if (key == null) continue;
if (key == null) { continue; }
key.Reset();
}
if (GUI.InputBlockingMenuOpen)
{
cursorPosition =
Position + PlayerInput.MouseSpeed.ClampLength(10.0f); //apply a little bit of movement to the cursor pos to prevent AFK kicking
}
}
else
{
@@ -280,13 +285,13 @@ namespace Barotrauma
{
cam.OffsetAmount = targetOffsetAmount = item.Prefab.OffsetOnSelected * item.OffsetOnSelectedMultiplier;
}
else if (SelectedConstruction != null && ViewTarget == null &&
else if (SelectedConstruction != null && ViewTarget == null &&
SelectedConstruction.Components.Any(ic => ic?.GuiFrame != null && ic.ShouldDrawHUD(this)))
{
cam.OffsetAmount = targetOffsetAmount = 0.0f;
cursorPosition =
SelectedConstruction.Position +
new Vector2(cursorPosition.X % 10.0f, cursorPosition.Y % 10.0f); //apply a little bit of movement to the cursor pos to prevent AFK kicking
cursorPosition =
SelectedConstruction.Position +
PlayerInput.MouseSpeed.ClampLength(10.0f); //apply a little bit of movement to the cursor pos to prevent AFK kicking
}
else if (!GameMain.Config.EnableMouseLook)
{
@@ -439,7 +439,8 @@ namespace Barotrauma
bool mouseOnPortrait = false;
if (character.Stun <= 0.1f && !character.IsDead)
{
if (CharacterHealth.OpenHealthWindow == null && character.SelectedCharacter == null)
bool wiringMode = Screen.Selected == GameMain.SubEditorScreen && GameMain.SubEditorScreen.WiringMode;
if (CharacterHealth.OpenHealthWindow == null && character.SelectedCharacter == null && !wiringMode)
{
if (character.Info != null && !character.ShouldLockHud())
{
@@ -1914,13 +1914,17 @@ namespace Barotrauma
i++;
}
if (selectedLimbIndex > -1)
if (selectedLimbIndex > -1 && selectedLimbText != null)
{
var selectedLimbArea = GetLimbHighlightArea(limbHealths[selectedLimbIndex], drawArea);
GUI.DrawLine(spriteBatch,
new Vector2(selectedLimbText.Rect.X, selectedLimbText.Rect.Center.Y),
selectedLimbArea.Center.ToVector2(),
Color.LightGray * 0.5f, width: 4);
LimbHealth limbHealth = limbHealths[selectedLimbIndex];
if (limbHealth?.IndicatorSprite != null)
{
Rectangle selectedLimbArea = GetLimbHighlightArea(limbHealth, drawArea);
GUI.DrawLine(spriteBatch,
new Vector2(selectedLimbText.Rect.X, selectedLimbText.Rect.Center.Y),
selectedLimbArea.Center.ToVector2(),
Color.LightGray * 0.5f, width: 4);
}
}
if (draggingMed != null)