(cf495e03c) Check the visibility to the target when engaging (the distance is not enough, if there's something blocking the line of sight).
This commit is contained in:
@@ -87,6 +87,18 @@ namespace Barotrauma.Items.Components
|
||||
RelativeSpacing = 0.03f,
|
||||
Stretch = true
|
||||
};
|
||||
autopilotTickBox = new GUITickBox(new RectTransform(new Vector2(0.3f, 0.3f), paddedControlContainer.RectTransform),
|
||||
TextManager.Get("SteeringAutoPilot"), style: "GUIRadioButton")
|
||||
{
|
||||
OnSelected = (GUITickBox box) =>
|
||||
{
|
||||
AutoPilot = box.Selected;
|
||||
if (AutoPilot && MaintainPos)
|
||||
{
|
||||
posToMaintain = controlledSub == null ? item.WorldPosition : controlledSub.WorldPosition;
|
||||
}
|
||||
unsentChanges = true;
|
||||
user = Character.Controlled;
|
||||
|
||||
manualTickBox = new GUITickBox(new RectTransform(new Vector2(0.3f, 0.3f), paddedControlContainer.RectTransform),
|
||||
TextManager.Get("SteeringManual"), style: "GUIRadioButton")
|
||||
|
||||
Reference in New Issue
Block a user