Skip to content

Commit

Permalink
Mimic the df::coord is valid check
Browse files Browse the repository at this point in the history
  • Loading branch information
realSquidCoder committed Feb 11, 2025
1 parent 17c6be1 commit 54bc8a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ namespace
{
auto& ssConfig = stonesenseState.ssConfig;
Crd3D& selection = segment->segState.dfSelection;
if ((selection.x != -30000 && ssConfig.config.follow_DFcursor)) {
if ((selection.x >=0 && ssConfig.config.follow_DFcursor)) {
drawCursorAt(segment, selection, uiColor(3));
}
else {
Expand Down Expand Up @@ -947,7 +947,7 @@ void paintboard()
}
if(ssConfig.config.follow_DFcursor && ssConfig.config.debug_mode) {
top += fontHeight;
if(segment->segState.dfCursor.x != -30000) {
if(segment->segState.dfCursor.x >=0) {
draw_textf_border(font, uiColor(1), ssState.ScreenW/2,top, ALLEGRO_ALIGN_CENTRE, "Following DF Cursor at: %d,%d,%d", segment->segState.dfCursor.x,segment->segState.dfCursor.y,segment->segState.dfCursor.z);
}
}
Expand Down
2 changes: 1 addition & 1 deletion TrackingModes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void followCurrentDFFocus()
auto& ssConfig = stonesenseState.ssConfig;
auto& ssState = stonesenseState.ssState;

if(ssState.dfCursor.x != -30000) {
if(ssState.dfCursor.x >=0) {
ssState.Position.x = ssState.dfCursor.x - (ssState.Size.x / 2) + ssConfig.config.viewOffset.x;
ssState.Position.y = ssState.dfCursor.y - (ssState.Size.y / 2) + ssConfig.config.viewOffset.y;
ssState.Position.z = ssState.dfCursor.z + ssConfig.config.viewOffset.z + 1;
Expand Down

0 comments on commit 54bc8a5

Please sign in to comment.