From 3a091245572872f5cda79eab92eb392f92c02b39 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Aug 2014 22:29:29 +0300 Subject: Move chat command /move into actions. --- src/actions/commands.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/actions/commands.cpp') 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 -- cgit v1.2.3-60-g2f50