diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-25 22:29:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-25 22:29:29 +0300 |
commit | 3a091245572872f5cda79eab92eb392f92c02b39 (patch) | |
tree | 512e1b815194d865f67714542ab076411e084f32 /src/commands.cpp | |
parent | 10029599ee4cb4c26531303ab0e07cedc856f1ad (diff) | |
download | manaplus-3a091245572872f5cda79eab92eb392f92c02b39.tar.gz manaplus-3a091245572872f5cda79eab92eb392f92c02b39.tar.bz2 manaplus-3a091245572872f5cda79eab92eb392f92c02b39.tar.xz manaplus-3a091245572872f5cda79eab92eb392f92c02b39.zip |
Move chat command /move into actions.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index bc3fc37c7..80fac44fe 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -99,22 +99,6 @@ extern char **environ; namespace Commands { -static bool parse2Int(const std::string &args, int &x, int &y) -{ - bool isValid = false; - const size_t pos = args.find(" "); - if (pos != std::string::npos) - { - if (pos + 1 < args.length()) - { - x = atoi(args.substr(0, pos).c_str()); - y = atoi(args.substr(pos + 1, args.length()).c_str()); - isValid = true; - } - } - return isValid; -} - static void outStringNormal(ChatTab *const tab, const std::string &str, const std::string &def) @@ -167,19 +151,6 @@ static void outStringNormal(ChatTab *const tab, } } -impHandler(move) -{ - int x = 0; - int y = 0; - - if (localPlayer && parse2Int(event.args, x, y)) - { - localPlayer->setDestination(x, y); - return true; - } - return false; -} - impHandler(navigate) { if (!localPlayer) |