(2edf7845f) Progress on docking interface (nudge controls), focus sonar on the center of the submarine instead of the nav terminal

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:40:31 +03:00
parent 2199a0f97f
commit a2c2f72357
11 changed files with 241 additions and 48 deletions
@@ -474,7 +474,9 @@ namespace Barotrauma.Items.Components
if (!posToMaintain.HasValue)
{
unsentChanges = true;
posToMaintain = controlledSub == null ? item.WorldPosition : controlledSub.WorldPosition;
posToMaintain = controlledSub != null ?
controlledSub.WorldPosition :
item.Submarine == null ? item.WorldPosition : item.Submarine.WorldPosition;
}
if (!AutoPilot || !MaintainPos) unsentChanges = true;