diff --git a/Barotrauma/BarotraumaClient/Source/DebugConsole.cs b/Barotrauma/BarotraumaClient/Source/DebugConsole.cs index b993f7deb..b8c7f8fee 100644 --- a/Barotrauma/BarotraumaClient/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaClient/Source/DebugConsole.cs @@ -962,8 +962,6 @@ namespace Barotrauma } } } - element.Value = lines[i]; - i++; } }, isCheat: false)); #endif diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/StatusHUD.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/StatusHUD.cs index 8b6b5ea03..b56dd8629 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/StatusHUD.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/StatusHUD.cs @@ -181,7 +181,7 @@ namespace Barotrauma.Items.Components Dictionary combinedAfflictionStrengths = new Dictionary(); foreach (Affliction affliction in allAfflictions) { - if (affliction.Strength < affliction.Prefab.ActivationThreshold || affliction.Strength <= 0.0f) continue; + if (affliction.Strength < affliction.Prefab.ShowInHealthScannerThreshold || affliction.Strength <= 0.0f) continue; if (combinedAfflictionStrengths.ContainsKey(affliction.Prefab)) { combinedAfflictionStrengths[affliction.Prefab] += affliction.Strength; diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs index f085e6b07..19904cd90 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs @@ -940,7 +940,7 @@ namespace Barotrauma string targetingTag = null; if (targetCharacter != null) { - if (targetCharacter.Submarine != null && Character.Submarine == null) + if (targetCharacter.IsDead) { targetingTag = "dead"; if (targetCharacter.Submarine != Character.Submarine) @@ -1042,11 +1042,6 @@ namespace Barotrauma valueModifier *= targetingPriorities[targetingTag].Priority; - if (targetingTag == null) continue; - if (!targetingPriorities.ContainsKey(targetingTag)) continue; - - valueModifier *= targetingPriorities[targetingTag].Priority; - if (valueModifier == 0.0f) continue; Vector2 toTarget = target.WorldPosition - character.WorldPosition; diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs index cb053d161..f1d72e0b4 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs @@ -1110,13 +1110,15 @@ namespace Barotrauma ViewTarget = null; if (!AllowInput) return; - Vector2 smoothedCursorDiff = cursorPosition - SmoothedCursorPosition; - if (Controlled == this) + if (Controlled == this || (GameMain.NetworkMember != null && GameMain.NetworkMember.IsServer)) { SmoothedCursorPosition = cursorPosition; } else { + //apply some smoothing to the cursor positions of remote players when playing as a client + //to make aiming look a little less choppy + Vector2 smoothedCursorDiff = cursorPosition - SmoothedCursorPosition; smoothedCursorDiff = NetConfig.InterpolateCursorPositionError(smoothedCursorDiff); SmoothedCursorPosition = cursorPosition - smoothedCursorDiff; } diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Health/Afflictions/AfflictionPrefab.cs b/Barotrauma/BarotraumaShared/Source/Characters/Health/Afflictions/AfflictionPrefab.cs index aea153f53..708e62bee 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Health/Afflictions/AfflictionPrefab.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Health/Afflictions/AfflictionPrefab.cs @@ -153,7 +153,10 @@ namespace Barotrauma //how high the strength has to be for the affliction icon to be shown in the UI public readonly float ShowIconThreshold = 0.05f; public readonly float MaxStrength = 100.0f; - + + //how high the strength has to be for the affliction icon to be shown with a health scanner + public readonly float ShowInHealthScannerThreshold = 0.05f; + public float BurnOverlayAlpha; public float DamageOverlayAlpha; @@ -257,6 +260,8 @@ namespace Barotrauma ShowIconThreshold = element.GetAttributeFloat("showiconthreshold", Math.Max(ActivationThreshold, 0.05f)); MaxStrength = element.GetAttributeFloat("maxstrength", 100.0f); + ShowInHealthScannerThreshold = element.GetAttributeFloat("showinhealthscannerthreshold", Math.Max(ActivationThreshold, 0.05f)); + DamageOverlayAlpha = element.GetAttributeFloat("damageoverlayalpha", 0.0f); BurnOverlayAlpha = element.GetAttributeFloat("burnoverlayalpha", 0.0f);