Skip to content

Commit

Permalink
fix: Hide autopilot lines on viewscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderson1993 committed Jan 15, 2023
1 parent d17bf03 commit 05c1485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/components/Starmap/StarmapShip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function StarmapShip({
const isNotViewscreen = useStarmapStore(
store => store.viewingMode !== "viewscreen"
);
const isCore = useStarmapStore(store => store.viewingMode === "core");

const group = useRef<Group>(null);
const shipMesh = useRef<Group>(null);
Expand Down Expand Up @@ -79,6 +80,7 @@ export function StarmapShip({
// Autopilot Destination
if (lineRef.current && group.current) {
if (
isCore &&
// TODO September 14, 2022 - Make it so you can toggle autopilot lines on and off
// useConfigStore.getState().includeAutopilotData &&
shipAutopilot?.destinationPosition
Expand All @@ -99,7 +101,7 @@ export function StarmapShip({
lineRef.current.geometry.attributes.position.needsUpdate = true;
lineRef.current.visible = true;
} else {
// lineRef.current.visible = false;
lineRef.current.visible = false;
}
}
});
Expand Down

0 comments on commit 05c1485

Please sign in to comment.