(943a1e25b) Report all visible hulls, but add a dialogue line and icon only for current hull.

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:50:42 +03:00
parent 437465690b
commit 1e41ed6b63
12 changed files with 484 additions and 101 deletions
@@ -1145,6 +1145,15 @@ namespace Barotrauma
SmoothedCursorPosition = cursorPosition - smoothedCursorDiff;
}
if (!(this is AICharacter) || Controlled == this || IsRemotePlayer)
{
//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;
}
if (!(this is AICharacter) || Controlled == this || IsRemotePlayer)
{
if (speedMultipliers.Count == 0) return 1f;
@@ -2656,8 +2665,8 @@ namespace Barotrauma
public AttackContext GetAttackContext() => AnimController.CurrentAnimationParams.IsGroundedAnimation ? AttackContext.Ground : AttackContext.Water;
private List<Hull> visibleHulls = new List<Hull>();
private HashSet<Hull> tempList = new HashSet<Hull>();
private readonly List<Hull> visibleHulls = new List<Hull>();
private readonly HashSet<Hull> tempList = new HashSet<Hull>();
/// <summary>
/// Returns hulls that are visible to the player, including the current hull.
/// Can be heavy if used every frame.