(392954b0e) Swap the order of the starting location & destination in nav terminals when playing in a mirrored sub.
This commit is contained in:
@@ -152,6 +152,32 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
if (character.MemLocalState.Count > 120) character.MemLocalState.RemoveRange(0, character.MemLocalState.Count - 120);
|
||||
character.MemState.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
partial void ImpactProjSpecific(float impact, Body body)
|
||||
{
|
||||
float volume = MathHelper.Clamp(impact - 3.0f, 0.5f, 1.0f);
|
||||
|
||||
if (body.UserData is Limb limb && character.Stun <= 0f)
|
||||
{
|
||||
if (impact > 3.0f) { PlayImpactSound(limb); }
|
||||
}
|
||||
else if (body.UserData is Limb || body == Collider.FarseerBody)
|
||||
{
|
||||
if (!character.IsRemotePlayer && impact > ImpactTolerance)
|
||||
{
|
||||
SoundPlayer.PlayDamageSound("LimbBlunt", strongestImpact, Collider);
|
||||
}
|
||||
}
|
||||
if (Character.Controlled == character)
|
||||
{
|
||||
GameMain.GameScreen.Cam.Shake = Math.Min(Math.Max(strongestImpact, GameMain.GameScreen.Cam.Shake), 3.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (character.MemState.Count < 1) return;
|
||||
|
||||
overrideTargetMovement = Vector2.Zero;
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace Barotrauma.Items.Components
|
||||
private Vector2 keyboardInput = Vector2.Zero;
|
||||
private float inputCumulation;
|
||||
|
||||
private bool? swapDestinationOrder;
|
||||
|
||||
private bool levelStartSelected;
|
||||
public bool LevelStartSelected
|
||||
{
|
||||
@@ -423,6 +425,15 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override void UpdateHUD(Character character, float deltaTime, Camera cam)
|
||||
{
|
||||
if (swapDestinationOrder == null)
|
||||
{
|
||||
swapDestinationOrder = item.Submarine != null && item.Submarine.FlippedX;
|
||||
if (swapDestinationOrder.Value)
|
||||
{
|
||||
levelStartTickBox.RectTransform.SetAsLastChild();
|
||||
}
|
||||
}
|
||||
|
||||
if (steerArea.Rect.Contains(PlayerInput.MousePosition))
|
||||
{
|
||||
if (!PlayerInput.KeyDown(InputType.Deselect) && !PlayerInput.KeyHit(InputType.Deselect))
|
||||
|
||||
Reference in New Issue
Block a user