summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp14
-rw-r--r--src/actions/commands.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 797c75edb..712850a9f 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -72,6 +72,7 @@
#include "net/net.h"
#include "utils/gettext.h"
+#include "utils/stringutils.h"
#include "debug.h"
@@ -272,4 +273,17 @@ impHandler0(printAll)
return false;
}
+impHandler(move)
+{
+ int x = 0;
+ int y = 0;
+
+ if (localPlayer && parse2Int(event.args, x, y))
+ {
+ localPlayer->setDestination(x, y);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 02810286c..35bd27538 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -38,6 +38,7 @@ namespace Actions
decHandler(chatErase);
decHandler(present);
decHandler(printAll);
+ decHandler(move);
} // namespace Actions
#undef decHandler