summaryrefslogtreecommitdiff
path: root/plugins/follow.cpp
diff options
context:
space:
mode:
authorMike Stewart2012-02-28 09:16:33 -0800
committerMike Stewart2012-02-28 09:16:33 -0800
commitbc02acb64f5e5ac126bd5e0c6bd3429dc0fa3985 (patch)
tree4a3549a86fb01f514d3720813d324e2e49488829 /plugins/follow.cpp
parentf8721c88b57b22842a2d0ecf60f58b31d151b600 (diff)
downloaddfhack-bc02acb64f5e5ac126bd5e0c6bd3429dc0fa3985.tar.gz
dfhack-bc02acb64f5e5ac126bd5e0c6bd3429dc0fa3985.tar.bz2
dfhack-bc02acb64f5e5ac126bd5e0c6bd3429dc0fa3985.tar.xz
Fix cursor detection for follow.
Diffstat (limited to 'plugins/follow.cpp')
-rw-r--r--plugins/follow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/follow.cpp b/plugins/follow.cpp
index fb72df5e..ab4bb4a3 100644
--- a/plugins/follow.cpp
+++ b/plugins/follow.cpp
@@ -77,7 +77,7 @@ DFhackCExport command_result plugin_onupdate ( Core * c )
gui->getMenuWidth(menu_width, area_map_width);
gui->getCursorCoords(c_x,c_y,c_z);
- if (c_z == -3000 && menu_width == 3) menu_width = 2; //Presence of the cursor means that there's actually a width-2 menu open
+ if (c_x == -30000 && menu_width == 3) menu_width = 2; //Presence of the cursor means that there's actually a width-2 menu open
h -= 2; //account for vertical borders
@@ -114,7 +114,7 @@ DFhackCExport command_result plugin_onupdate ( Core * c )
gui->setViewCoords(x, y, z); //Set the new screen position!
- if (c_x != 3000 && !world->ReadPauseState()) gui->setCursorCoords(c_x - (prevX-x), c_y - (prevY-y), z); //If, for some reason, the cursor is active and the screen is still moving, move the cursor along with the screen
+ if (c_x != -30000 && !world->ReadPauseState()) gui->setCursorCoords(c_x - (prevX-x), c_y - (prevY-y), z); //If, for some reason, the cursor is active and the screen is still moving, move the cursor along with the screen
prevX = x; //Save this round's stuff for next time so we can monitor for changes made by the user
prevY = y;