From ae4062ed3c48706127c32efbc70cca0cc5ce19f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Aug 2014 11:58:28 +0300 Subject: Move chat command /navigate into actions. --- src/actions/commands.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/actions/commands.cpp') diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 5038d9f57..29e7e740c 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -394,4 +394,19 @@ impHandler(follow) return true; } +impHandler(navigate) +{ + if (!localPlayer) + return false; + + int x = 0; + int y = 0; + + if (parse2Int(event.args, x, y)) + localPlayer->navigateTo(x, y); + else + localPlayer->navigateClean(); + return true; +} + } // namespace Actions -- cgit v1.2.3-60-g2f50