Skip to content

Commit 71f92c6

Browse files
authored
Update Gui.cpp - Redundant code
1 parent aa61289 commit 71f92c6

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

library/modules/Gui.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,22 +2962,8 @@ bool Gui::getCursorCoords(int32_t &x, int32_t &y, int32_t &z)
29622962

29632963
bool Gui::getCursorCoords(df::coord &pos)
29642964
{
2965-
using df::global::cursor;
2966-
df::coord p;
2967-
if (World::isAdventureMode())
2968-
{
2969-
if (game)
2970-
{
2971-
auto &look = game->main_interface.adventure.look;
2972-
if (look.open)
2973-
p = look.cursor;
2974-
}
2975-
}
2976-
else if (cursor)
2977-
p = df::coord(cursor->x, cursor->y, cursor->z);
2978-
2979-
pos = p;
2980-
return p.isValid();
2965+
pos = getCursorPos();
2966+
return pos.isValid();
29812967
}
29822968

29832969
//FIXME: confine writing of coords to map bounds?

0 commit comments

Comments
 (0)